16

I have two apps on facebook. In one, I can make API calls. In the other, I can not. I checked the configuration and the settings are the same. Can you help me?

Example: https://graph.facebook.com/860599774051206/?access_token=APP_ID|APP_SECRET

https://graph.facebook.com/860599774051206/notifications?template=@[860599774051206]test&access_token=APP_ID|APP_SECRET&method=post

the error is:

{ "error": { "message": "Unsupported post request. Object with ID '860599774051206' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at developers.facebook.com/docs/graph-api", "type": "GraphMethodException", "code": 100, "fbtrace_id": "BRW7BqFeEER" } }

6
  • Can yo post some code here? Commented Aug 6, 2016 at 14:07
  • Hi. The problem is The call with The facebook's api. If i use this call in app it's works, in The other app dont work. I believe that The problem is a setting in The facebook app but i dont understand this setting Commented Aug 6, 2016 at 20:19
  • Unsupported GET/POST request almost always means that you are either using a wrong id (remember, user ids are app-scoped!), or do not have the necessary permissions. Commented Aug 8, 2016 at 10:17
  • Hi, the id is correct, it's my id on facebook. I tested the api wth php sdk. [code] $fb = new Facebook\Facebook([ 'app_id' => '7593****', 'app_secret' => '16a010c95****', ]); $fb->setDefaultAccessToken('75930***|16a010c95eaa***'); $res = $fb->get('/860***'); print_r($res); die(); [/code] Fatal error: Uncaught exception 'Facebook\Exceptions\FacebookAuthenticationException' with message 'Unsupported get request. Object with ID does not exist, cannot be loaded due to missing permissions, or does not support this operation. Commented Aug 8, 2016 at 13:18
  • Check this stackoverflow.com/a/52380426/6667442 Commented Sep 18, 2018 at 6:45

8 Answers 8

7

Each app has its own user_id.

In one app the user_id is 962084030569446, in the other app it is 860599774051206.

Sign up to request clarification or add additional context in comments.

Comments

3

I faced this issue when I was trying to post a response to an user from a page. I used the graph API me/accounts and got the list of pages. From there I retrieved the access_token of the page from which I'm going to post the response. I got the same error mentioned in the question.

The issue for me is the user account to which I was supposed to respond is locked due to security. This is the error I got from facebook when I tried to login You can't use Facebook at the moment

This is the error I got for the post api call

{
    "error": {
        "message": "Unsupported post request. Object with ID 'xxx' 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": "yyy"
    }
}

Once the account security is resolved, the issue is resolved.

Comments

2

While unrelated to the OP problem I thought I would contribute, I got this error when posting to the Offline Events endpoint https://graph.facebook.com/v2.8/<business_id>/events. I had posted from a node.js app successfully, then when porting the approach to a .Net implementation in our Linnworks order management system, got this error.

Turned out, I had mis-typed the access_token parameter that goes in the form data, i.e.

System.Collections.Specialized.NameValueCollection formFields = new System.Collections.Specialized.NameValueCollection();
formFields.Add("accessToken", accessToken);
formFields.Add("upload_tag", "store_data");
formFields.Add("data", data);

Should have been:

System.Collections.Specialized.NameValueCollection formFields = new System.Collections.Specialized.NameValueCollection();
formFields.Add("access_token", accessToken);
formFields.Add("upload_tag", "store_data");
formFields.Add("data", data);

Getting the access_token field wrong in this way caused this 'Object with ID does not exist' which is a bit of a red herring. I guess that, once the access_token value was not provided, no objects could be enumerated in our account because the request didn't authenticate in order to provide permissions, and so the object was 'not found'

(you do not have to use NameValueCollection, this is just a by-product of me using the multipart post implementation suggested here Upload files with HTTPWebrequest (multipart/form-data))

Comments

0

In my case - I had to use the app-id to get the list of pages using me/accounts.

Once I identify the page that I want to post the message to, I have to use the page-id to feed page-id/feed.

This solved the issue.

For example:

    $response = $fb->get('/me/accounts', (string)$selBehRow1["fb_app_access_token"]);
    foreach ($response->getDecodedBody() as $allPages) 
    {
        foreach ($allPages as $page ) 
        {               
            if (isset($page['id']) && $page['id'] == $selBehRow1['fb_page_id'])
            { // Suppose you save it as this variable
                $appAccessToken = (string) $page['access_token'];
                break;
            }
        }
    }

    $response = $fb->post(
        //this is wrong: '/'.$selBehRow1["fb_app_id"].'/feed',
        '/'.$selBehRow1["fb_page_id"].'/feed',
        array(
            "message" => "$msg",
            "link" => "$link",
            //"picture" => "http://www.example.net/images/example.png",
            "name" => "$name",
            "caption" => "$caption",
            "description" => "$description"
        ),
        $appAccessToken
    );
}

Comments

0

i think post_id is wrong you can check it once https://graph.facebook.com/860599774051206_4548643168486465/?access_token=APP_ID|APP_SECRET

https://developers.facebook.com/docs/graph-api/reference/v3.3/object/comments

use this api for replies to the post

Method: POST
https://graph.facebook.com/860599774051206_4548643168486465/comments?access_token=APP_ID|APP_SECRET
body:
{
"message": "Thanks"
}

Comments

0

In my case I needed to Complete Setup enter image description here

Comments

0

In my case, I messed up my variables which ended up in passing the wrong bearer token in the header, giving this error.

Comments

-3

You need to use GET request instead POST. Look at the documentation

1 Comment

Which documentation?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.