Facebook Graph API 2017 - Image uploaded to Timeline Photos instead of given Album (id)

南笙酒味 提交于 2019-12-02 10:14:52

More update: the child_attachments method didn't upload the images to FB. A post generated with sidescrolled images, but the images are just linked from my page. Meanwhile the albums are empty:

http://imgur.com/a/XPjzp

I just gave up. If multiple images uploaded, I grab the first's FB ID, make a public post to the page with it (FB creates a link to the album), and just add a note to the bottom of the post about the amount of uploaded images.


After contacting FB developers and got some tips from them, I've found out there were some changes from january.

The "published" field is gone, and there is a "no_story" field now, which have to be "true", if "published" was "false".

(The "no_story" name is funny a little, as from january stories were gone as well from v2.8 if I remember correctly. Can't find that alert again. More funny thing: at "/page/feed" docs there's still "published", while "album_id/photos" is using the "no_story" field. #wehatelogic)

But - and this is more interesting - now it's possible to post multiple images within one query! Minimum of 2, maximum of 5 (or 10; see docs) images can be attached to one post, and maximum of 5 are being displayed on Facebook.

For this, you have to use a "child_attachments" array. (Unfortunately if you want to upload only 1 image, you have to use a completely different method. #wehateyou)

More info at Facebook for Developers

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!