Trouble Posting 360 Image to Facebook [SOLVED]

Reposting from a Stack Overflow post entitled “Facebook post 360 image (Solved)

Question and solution about having problems getting Facebook to display images in 360 when using the Graph API.

SOLUTION: The parameter "allow_spherical_photo": true" is missing in the FB.API call example here:

function Facebook_Share(textToPost)
{
    var imgURL="http://panorama.2020.net/view/ybcjxd4hugnmeyvaorug/panorama.jpg";
    FB.api('me/photos', 'post', {
        message: textToPost,
        spherical_metadata : { "ProjectionType" : "equirectangular", "CroppedAreaImageWidthPixels" : "1696", "CroppedAreaImageHeightPixels" : "848", "FullPanoWidthPixels" : "4000",
            "FullPanoHeightPixels" : "2000", "CroppedAreaLeftPixels" : "566", "CroppedAreaTopPixels" : "283" },
        url:imgURL

    },  function(response){

    if (!response || response.error) {
        alert('Error occured');
    } else {
        alert('Post ID: ' + response.id);
        document.getElementById("myTextarea").value = "";
    }

});
}
1 Like