Reputation: 4054
I am trying to create a custom javascript "widget" so that we can pull statuses and such from Facebook to our various web sites. I've tried creating an application in FB developer center, getting access tokens and such, but no luck.
Can anyone point me in the right direction to at least get authenticated? We would like to be able to reuse the code on multiple sites if possible as well.
For reference, here's the error message I am currently getting when trying to access https://graph.facebook.com/statuses/?id=thePfisterHotel&access_token=_TOKEN_HERE_
{
"error": {
"message": "A user access token is required to request this resource.",
"type": "OAuthException",
"code": 102
}
}
Any help and guidance would be greatly appreciated!
Upvotes: 0
Views: 40
Reputation: 6824
I would highly recommend using the Facebook Javascript SDK, which is officially supported. With it you can easily add a Facebook login button. You can find more detailed examples in the Facebook for Websites documentation.
Upvotes: 0
Reputation: 173562
It seems that you're trying to use the application access token, but what you need is an access token that's the result of a user authorizing your app.
You can use the Graph API Explorer to play around with it while you're writing the app.
Upvotes: 2