0
votes

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.

1

1 Answers

0
votes

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: