skip to Main Content

I am trying to retrieve the number of likes for posts in a Facebook page. For instance, I am calling the following endpoint from Graph API explorer

nba?fields=posts{message, likes}

to retrieve posts from NBA page. But I only managed to retrieve message and id but not the likes. Is it because of new privacy policy?

`
{
“posts”: {
“data”: [
{
“message”: “๐Ÿ˜ƒ๐Ÿ˜€๐Ÿ˜ฎ Does ANYBODY get better bench reactions than Klay Thompson??

๐Ÿ‘€: Golden State Warriors x Cleveland Cavaliers Game 3
๐Ÿ“บ: 9 pm/et Wednesday, #NBAonABC”,
“id”: “8245623462_10156593269718463”
},
{
“message”: “๐Ÿ“ธ x #NBAFinals Game 2”,
“id”: “8245623462_10156593260853463”
},
{
“message”: “Game 2 in #PhantomCam! ๐Ÿ‘€ the BEST of Stephen Curry, LeBron James, & more slowed all the way down.

NBAFinals presented by YouTube TV”,

    "id": "8245623462_10156592692223463"
  },
  {
    "message": "George Hill added 15 PTS, 3 AST for the Cleveland Cavaliers in game 2 at Oracle Arena. #NBAFinals presented by YouTube TV",
    "id": "8245623462_10156590505838463"
  },
  {
    "message": "๐Ÿ—ฃ Stephen Curry somehow beat the shot clock with this WILD 3-pointer! Hear how it sounded around the world #GlobalGame ๐ŸŒŽ๐Ÿ€

`

3

Answers


  1. Yes it is, more information than public available (by example the likes, now just called reactions) options will be closed soon.

    Login or Signup to reply.
  2. But I only managed to retrieve message and id but not the likes. Is it because of new privacy policy?

    Yes. You will need admin access (page access token) now to get individual likes.

    If you only want the number of likes though, you can ask for the summary field:

    nba?fields=posts{message,likes.summary(1)}


    And be aware, you will still need to get your app reviewed for Page Public Content Access, otherwise you wonโ€™t be able to get any info about pages you do not have admin access to. It works using above example link when using the Graph API Explorer app id – but as soon as you switch to one of your own, you will get an error saying you need PPCA, if the app in question isnโ€™t already approved for that.

    Login or Signup to reply.
  3. https://developers.facebook.com/docs/graph-api/reference/v2.12/object/reactions

    Likes are call “reactions” now ,(
    thumb and , emoji reactions)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search