10

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

ekad
  • 14,436
  • 26
  • 44
  • 46
Giuseppe Lo Dico
  • 159
  • 1
  • 1
  • 6
  • Can yo post some code here? – Joff Aug 06 '16 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 – Giuseppe Lo Dico Aug 06 '16 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. – CBroe Aug 08 '16 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. – Giuseppe Lo Dico Aug 08 '16 at 13:18
  • Check this https://stackoverflow.com/a/52380426/6667442 – Ketan Ramani Sep 18 '18 at 06:45
  • Check if the value in your code is passed through correctly. Cause when I saw the error I found out that the pixeld id was null in my code. – OCP30pt1c1l1l43-X1z17 Jul 13 '22 at 08:36

7 Answers7

4

RESOLVED: Any app can change the user_id

In an app the user_id is 962084030569446, in the other 860599774051206

Thakns for all.

Giuseppe Lo Dico
  • 159
  • 1
  • 1
  • 6
2

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.

Maifee Ul Asad
  • 3,992
  • 6
  • 38
  • 86
Sandhiya C
  • 21
  • 2
1

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

Neek
  • 7,181
  • 3
  • 37
  • 47
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
    );
}
josephting
  • 2,617
  • 2
  • 30
  • 36
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"
}
Sai Jeevan Balla
  • 135
  • 3
  • 10
0

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

Yan Fox
  • 17
  • 1
0

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

Sergey Onishchenko
  • 6,943
  • 4
  • 44
  • 51