Getting App Access Token for facebook app?

Roger Johansson picture Roger Johansson · Aug 4, 2013 · Viewed 41.4k times · Source

I have read this: trying to get app access token

And it doesn't work... I'm getting the following error:

"error": {
   "message": "An active access token must be used to query 
                          information about the current user.",
  "type": "OAuthException",
  "code": 2500
}

I need the app access token in order to create open graph objects that are owned by the application. I know how to create objects owned by the users, but I just cant find the correct way of creating the App access token.

AppId -> doesn't work... AppId|AppSecret -> doesn't work.... App ClientToken -> doesn't work....

Anyone know this?

Answer

Sahil Mittal picture Sahil Mittal · Aug 4, 2013

You can get it directly from the Access Token Tool.


Please note: For security, app access token should never be hard-coded into client-side code, doing so would give everyone who loaded your webpage or decompiled your app full access to your app secret, and therefore the ability to modify your app. This implies that most of the time, you will be using app access tokens only in server to server calls.