简体   繁体   中英

creating album and posting a photo in facebook page

I'm trying to create an album and post photo to it , these operations have to be done on a "facebook page". Before writing any code i tested it on graph api explorer :

i tries following to create an album

/page_id/albums method:post

fields : name : "test" access_token : "valid access_token"

i got the above mentioned access token after granting permissions like :manage_pages , photo_upload . Any ideas where i might be going wrong. I have gone through the documents and stackoverflow questions but can't seem to figure out the problem.

i resolved the error , we have to set the access token to access token of the page . the access token can be obtained by issuing : /me/accounts using get method. also important thing is this will only show the list of pages to which the current user is admin to. the access token received from the graph explorer is valid for only 1 hour, but if you receive the access token by issuing $facebook->api('/me/accounts') in php then that access token never expires. to check if the access token is valid and related info the following link can be used to check:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM