Facebook notifications API: "This method must be called with an app access_token"

10,742

Solution 1

  • Change your app secret ASAP, you shouldn't include private info in these questions
  • Then, check the advanced settings of your app and make app type is set to 'Web', not to 'native/desktop' - if it's set to native/desktop the app secret isn't trusted and calls which need an app access token will fail.

Solution 2

Try using the access token from here :

https://developers.facebook.com/tools/access_token/

I had the same problem, and I've solved like that.

Share:
10,742
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    I am trying to send a Facebook notification from my app using Graph API Explorer. So I have selected my app, POST, and entered this string after the /

    11093774316/notifications?access_token=430xxxxxx156|HU0ygMtxxxxxxxxxxxxikVKg&template=Hello&href=index.php
    

    The access string is what I get on the "Access token debugger" and I check it is ok.

    However, I get this error message:

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

    I would say it was working one month ago... Any ideas?

    Thanks

  • neywen
    neywen about 11 years
    I just want to add that I checked the appAccessToken I get through the facebook debugguer : it seems to be ok, it's able to retrieve the app name.
  • neywen
    neywen about 11 years
    WTF! When I use the Graph API Explorer, with the same url, the same parameters (including the app access token), I get a "success : true"!! Could this problem related to the "Application Type" from the Facebook App Settings? For now, it's set as a "Web App".
  • neywen
    neywen about 11 years
    Ok, it's moving a bit forward, I post a new answer below.