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??
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!!