0

如何使用 PHP Facebook SDK v5 将 360 度图像发布到 Facebook?我尝试使用此参数'allow_spherical_photo'=> true,但它不起作用。将图像发布为简单的平面图像。这是我的代码

$message = '';
    $title = '';
    $link = 'http://google.com/';
    $description = 'My Image Posting';
   $url = 'My Public image url';
   $caption = 'My Image';

    $attachment = array(
      'message' => $message,
       'name' => $title,
       'allow_spherical_photo'=> true,
       'source' => $url,
       'description' => $description,
        'photo'=>$url,
    );
    echo "<pre>";
    print_r($attachment);
      try{
         echo "try";
        //Post to Facebook
     $fb->post('/me/feed', $attachment, $accessToken);

        //Display post submission status
        echo 'The post was submitted successfully to Facebook timeline.';
    }catch(FacebookResponseException $e){
        echo 'Graph returned an error: ' . $e->getMessage();
        exit;
    }catch(FacebookSDKException $e){
        echo 'Facebook SDK returned an error: ' . $e->getMessage();
        exit;
    }

谁能帮我吗?我搜索了很多。

4

0 回答 0