0

I have the following code

$(function(){
    $.ajaxSetup({ cache: true });
    $.getScript('//connect.facebook.net/en_US/sdk.js', function(){
    FB.init({
      appId: '{user-id}_{app-id}',
      version: 'v2.8' 
    });     

   FB.api(
        "/{post-id}/",
        function (response) {
         console.log( response.error );
        }
        );
  });
});

Where I have the correct values for {app-id} and {post-id} as documented here https://developers.facebook.com/docs/graph-api/reference/v2.8/post/

Yet I am getting this error

code : 12
fbtrace_id : "GUk/UD49xEO"
message : "(#12) singular statuses API is deprecated for versions v2.4 and higher"
type : "OAuthException"

Why am I getting this? Do I need an access token?

This is not the same as How should we retrieve an individual post now that /[post-id] is deprecated in v2.4?

Because that doesn't work. I've tried prefixing the post-id and I get the same error. Did you test this before you marked it as a duplicate?

Community
  • 1
  • 1
32423hjh32423
  • 3,048
  • 7
  • 44
  • 59
  • people don´t test every piece of code before marking something as duplicated, that would be weird ;) - anyway, is it a user post or a page post? are you using a user token or a page token? it is the same error, which means that it´s the same question even though the accepted answer may not apply to you (which i doubt, to be honest) – andyrandy Nov 28 '16 at 14:23
  • Where did you get the ID from in the first place? And btw., pretty sure that _is_ the same issue, otherwise you would not get that very same error message. – CBroe Nov 28 '16 at 14:24
  • 1
    I got the ID from a link on my page, but also here http://findmyfbid.com/ I've been trying to use user posts and user tokens. Where should I get the ID from? Where should I get the user token from? – 32423hjh32423 Nov 28 '16 at 14:44
  • This is what I'm getting with PROFILEID_POSTID `"Unsupported get request. Object with ID 'PROFILEID_POSTID' 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",` It doesn't look like it's a duplicate since the solution there no longer works. The solution in that other post was made when 2.4 was the latest API version, now they're at 2.8 – logicbloke Nov 28 '16 at 19:44
  • You get the user access token and user ID when the user logs in to your app – WizKid Nov 29 '16 at 03:07

0 Answers0