Facebook access_token invalid?

When using your Facebook Application’s token

If you’re using the me alias as in https://graph.facebook.com/me/ but your token is acquired for a Facebook Application, then “me” isn’t you anymore – it’s the app or maybe nothing. Anyway, that’s not your intention for the app to interact with itself.

In this case you will want to interact with your personal user account from an app. What you need to do (after giving the app the permissions it requests in the UI when it asks) is find your facebook userid # and put it in place of “me” to access your own info. e.g. Mark Zuckerberg’s facebook userid is 4 so he is https://graph.facebook.com/4/

The alias me only works if you’re you! Sometimes it’s hard to remember who the current user is when programming facebook (i.e. you, the Page, the App, etc) because we’re accustomed to using the facebook UI as ourselves most of the time. From a programming standpoint it depends on what the acquired token represents.

A great blog post that always helps correct me is Ben Biddington | Facebook Graph API — getting access tokens.

Leave a Comment