skip to Main Content

I’m working on a facebook webhook development with Facebook graph API v16.0. My requirement is to get the name of the facebook user who chats with my page. The steps that I have been done so far is listed as follows

  1. Create an app in meta for developers
  2. Get the advanced access for pages_messaging, public_profile and email permissions
  3. Set up some testers and test the app with chat with the page
  4. After that I turned on the live mode in the app

Still normal users other than admins, testers and developers are unable to get the automatic replies that I’ve been provided via my webhook through the page.

I need the display name of the facebook user send some greeting message in the first place. The user details can be requested via this API call descriptive link with the public_profile and email access.

        request({
            "uri": uri + psid,
            "qs": {
                "fields": 'name',
                "access_token": USER_ACCESS_TOKEN
            },
            "method": "GET"
        }, (err, res, body) => {
            if (!err && !body.error) {
                console.log(JSON.parse(body));
                callback(JSON.parse(body));
            } else {
                logger.log('error', 'Unable to retrieve user details: ' + body.error);
            }
        })

But all the time I’m ended up with the following error message.

{
"error": {
    "message": "(#3) Application does not have the capability to make this API call.",
    "type": "OAuthException",
    "code": 3,
    "fbtrace_id": "AsmLH3l7txYnjCOx4_bk3__"
    }
}

When I insert a page access token instead of user access token, I get the following error message

{
 error: {
       message: "Unsupported get request. Object with ID '6086967031397974' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
       type: 'GraphMethodException',
       code: 100,
       error_subcode: 33,
       fbtrace_id: 'AIaDnVYMQ63fA4N8ifA9Yxw'
      }
}
Back To Top
Search