skip to Main Content

I am posting a 10 MB GIF file to facebook with below API call.

FB.api('/me/feed', 'post', {
    link: url,
    description: "test",
    caption: "test",
    source: url,
    privacy: {
        value: "EVERYONE"
    }
}, function (response) {
    //some code
}); 

The image is getting posted, but in facebook, I cant see the preview image.
But when I click on the image, it is getting opened and playing the GIF.
Can anybody tell me why??

enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    I ended up adding the GIF image as a video with the following code.

    FB.api('/me/videos', 'post', {
        file_url: "<url of GIF>",
        description: "<description>",
        caption: "<caption>",
        source: "<url of GIF>",
        privacy: {
            value: "EVERYONE"
        }
    }, function (response) { 
        // some code 
    });
    

    And it worked!!


  2. You can only post GIF images by adding the link to it.
    you cannot post a gif animation file.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search