How to post the 360degree image to Facebook using PHP Facebook SDK v5? I tried using this parameter 'allow_spherical_photo'=> true, But it is not working. Posting image as simple flat image. here is my code
$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;
}
can anyone help me out? I searched a lot.