How should we retrieve an individual post now that

2019-01-01 16:21发布

问题:

I just tried through the Graph API Explorer with this path /v2.4/10153513872748291 and I\'ve got this result:

{
  \"error\": {
    \"message\": \"(#12) singular links API is deprecated for versions v2.4 and higher\",
    \"type\": \"OAuthException\",
    \"code\": 12
  }
}

But https://developers.facebook.com/docs/reference/api/post/ doesn\'t say anything about deprecation.

I\'m not sure if I miss something, or there\'s another way to get info about an individual post.

Edit: v2.3 works, but v2.4 is the latest one.

回答1:

Looks like you now need to the combination of the id of the user or page that made the post (or who’s wall it is on), an underscore, and then the post id.

For your example post, 10153513872748291, that is made by a page Drama-addict, that has the id 141108613290 – so 141108613290_10153513872748291 will work.

And so does 788239567865981_10153513872748291, because 788239567865981 is the id of the user making the post.



回答2:

Firstput userId underscore add postId /Likes to check Like status in facebook

userId_post_Id/Likes to fetch Likes Records

userId_post_Id/Comments to fetch Comments Records

    https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=303261006522998_751199848395776%2FLikes&version=v2.9

    **In this link Right side Get Token indide GetAccessToken to select Permission**

\"enter

    303261006522998_751199848395776/Likes
    303261006522998_751199848395776/Comments

{
  \"data\": [
    {
      \"id\": \"124778301449917\",
      \"name\": \"Manisha Gera\"
    },
    {
      \"id\": \"1680577265523548\",
      \"name\": \"Rubi Sharma\"
    }
  ],
  \"paging\": {
    \"cursors\": {
      \"before\": \"MTI0Nzc4MzAxNDQ5OTE3\",
      \"after\": \"MTY4MDU3NzI2NTUyMzU0OAZDZD\"
    }
  }
}