The Kraken
The Kraken

Reputation: 3158

Facebook API Auto-Generate OAuth Token

Say that I have a website where I'd like to pull public data from a certain fan base on Facebook (i.e. recent posts, likes, places, etc.), but do not want a viewer to have to sign into FB. Understand that I wouldn't be interested in any particular user's information, and thus wouldn't need their specific login authentication. Is there a way to auto-generate an OAuth token to use with the FB API so that generic requests could be made without forcing the user to login?

Upvotes: 3

Views: 2391

Answers (1)

Lix
Lix

Reputation: 48006

What you can do is use an application access token to make these calls. To create you app access token, simply concatenate your APP_ID and your APP_SECRET with a pipe character.

https://graph.facebook.com/FacebookDevelopers/feed?access_token=APP_ID|APP_SECRET

This will return all the public stories from the Facebook developers page feed. You can use the pages vanity URL if it has one, but you can also use the PAGE_ID.

Upvotes: 2

Related Questions