-1

My query goes like this: If I have a feedItem (an image posted on facebook), how can I verify that I have liked it or not? Can I verify all the interactions which I have done to the feedItem or the interactions other people have done to it (like, dislike, pin, share)? Is there any way in getstream.io to retrieve these interactions?

Thanks in advance...

Super Jade
  • 5,609
  • 7
  • 39
  • 61

1 Answers1

0

Graph API provides all functions you need. Here are some examples:

  1. Read shares[it's a field of an object]: https://developers.facebook.com/docs/graph-api/reference/v3.1/post#read
  2. Read Shared posts: https://developers.facebook.com/docs/graph-api/reference/v3.1/object/sharedposts
  3. read likes: https://developers.facebook.com/docs/graph-api/reference/v3.1/object/likes#read

/likes returns only the profile for the current user if read with a user access token:

Album, Photo, Post, Video

all returns are JSON, which you can directly Deserialize Anonymous Type without using stream, for example, likes:

  {
  "likes": {
    "data": [
      {
        "name": "Bill the Cat",
        "id": "155111347875779",
        "created_time": "2017-06-18T18:21:04+0000"
      },
      {
        "name": "Calvin and Hobbes",
        "id": "257573197608192",
        "created_time": "2017-06-18T18:21:02+0000"
      },
      {
        "name": "Berkeley Breathed's Bloom County",
        "id": "108793262484769",
        "created_time": "2017-06-18T18:20:58+0000"
      }
    ],
    "paging": {
      "cursors": {
        "before": "Nzc0Njg0MTQ3OAZDZD",
        "after": "NTcxODc1ODk2NgZDZD"
      },
      "next": "https://graph.facebook.com/vX.X/me/likes?access_token=user-access-token&pretty=0&summary=true&limit=25&after=NTcxODc1ODk2NgZDZD"
    },
    "summary": {
      "total_count": 136
    }
  },
  "id": "user-id"
}
Dongdong
  • 2,208
  • 19
  • 28