Facebook API works fine for /feed, but not for /photos

大兔子大兔子 提交于 2019-12-04 17:36:07

The path you are using /406221796071956/photos is wrong and that's why it does not work.

The reason that this path is wrong, is that 406221796071956 is the id of a picture, see for yourself, the Graph API Explorer for 406221796071956 says:

"type": "photo"

If you want to publish to that album then use /196878530339618/photos, since it's the album: Graph API Explorer for 196878530339618

"type": "album"


Edit

Please refer to https://developers.facebook.com/docs/reference/api/album/#photos for adding photos to an album.


2nd Edit

According to the documentation of the Album object:

can_upload

Determines whether the UID can upload to the album and returns true if the user owns the album, the album is not full, and the app can add photos to the album

So you need the album not to be full, to be the owner of the album and have the right permissions for uploading.

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