0

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!

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Does this mean that a user would have to be logged in and authorized on the web site?
@mmillican Yeah, from whomever you wish to retrieve the status.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.