Giuseppe Lo Dico
Giuseppe Lo Dico

Reputation: 199

"message": "Unsupported post request. Object with ID does not exist, cannot be loaded due to missing permissions

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" } }

Upvotes: 13

Views: 62003

Answers (7)

Giuseppe Lo Dico
Giuseppe Lo Dico

Reputation: 199

Each app has its own user_id.

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

Upvotes: 5

Sergey Onishchenko
Sergey Onishchenko

Reputation: 7851

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

Upvotes: 0

Sandhiya C
Sandhiya C

Reputation: 21

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.

Upvotes: 2

Yan Fox
Yan Fox

Reputation: 11

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

Upvotes: -3

Sai Jeevan Balla
Sai Jeevan Balla

Reputation: 145

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"
}

Upvotes: 0

Neek
Neek

Reputation: 7461

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))

Upvotes: 1

INT9 Solutions
INT9 Solutions

Reputation: 1

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
    );
}

Upvotes: 0

Related Questions