user2605381
user2605381

Reputation: 81

Facebook open graph says access_token needed

I'm trying to post the following the facebook Graph API explorer.

cody.short.94/notifications? access_token= {User Access Token} &template= this is a test &href= www.test.com

I want to be able to send the user a notification, but all attempts have failed. I'm currently getting this error:

{
   "error": {
       "message": "(#15) This method must be called with an app access_token.", 
       "type": "OAuthException", 
       "code": 15
   }
}

I'm not sure what is causing it, and I'm in need of some guidance. Any help would be appreciated. note: my app is currently marked for web so that it not the problem

Upvotes: 1

Views: 2014

Answers (2)

Juan de la Torre
Juan de la Torre

Reputation: 1297

Make sure you paste the app access token APP_ID|APP_SECRET on the top field that says Access Tokenenter image description here

Upvotes: 1

Sahil Mittal
Sahil Mittal

Reputation: 20753

See, the error is quite self-explanatory :

This method must be called with an app access_token

The Notifications API use the APP Access Token, not the user access token!

The App Access Token is: APP_ID|APP_SECRET or get directly from here for testing. (Make sure of the security of this token, this is very crucial and just like a password to your app)

Now test the query with Graph API Explorer , and remove the user token from the Access token field and replace it with the App Access Token

It will look something like this- enter image description here

Upvotes: 3

Related Questions