Reputation: 1448
I would lik to display the photos from an album of a fan page (that I own) on my site. Only from this fan page, not from the visitors their own page. So I don't won't to see a permessions dialog when a users surfs to the site.
I tried to use the Graph Explorer to generate an Access Token for my App. https://developers.facebook.com/tools/explorer
With this acces token, I used this url
https://graph.facebook.com/120545691408560/photos?access_token={accessToken}
This worked very well, I got the photos I wanted.
But when I logged out of Facebook, I've got the following error
message: "Error validating access token: The session is invalid because the user logged out."
So how do I generate an Acces Token that works when I am not logged in?
Thanks a lot
Vincent
Upvotes: 0
Views: 932
Reputation: 5980
You have to GET a new token each time you communicate without the Facebook api. (at least for most queries)
So you have to implement some kind of authentication using the Facebook api.
There are different libraries you can use in JavaScript or Othello languages. Facebook graph explorer just lets you test api functions. Its not a copy paste solution.
Upvotes: 2