Omri Cohen
Omri Cohen

Reputation: 15

Getting the last date user clicked like on anything on Facebook

I'm developing an app on facebook and want to get the last date that the user of my app liked anything on Facebook.

It doesn't matter if its a page, post, comment, link or anything else you can like on Facebook.

Is it possible?

Thanks!

Upvotes: 0

Views: 1805

Answers (2)

PCheese
PCheese

Reputation: 3251

Actually, you can. (Probably added since Peter Bailey wrote his answer.)

Each like has a created_time field. The likes connection of a user object in the graph API returns most recently liked objects first. So if you just fetch the most recently liked item and check its creation time, you can get this data.

The API GET call would be:

/me/likes?limit=1

and the result would look like:

{
  "data": [
    {
      "name": "Steve Jobs", 
      "category": "Business person", 
      "id": "113529011990795", 
      "created_time": "2011-09-23T02:22:22+0000"
    }
  ], 
}

You can play with this on the Graph API Explorer.

Upvotes: 1

Peter Bailey
Peter Bailey

Reputation: 105916

No.

A timestamp or other type of date value is not part of the information retrievable for likes. Not through FQL nor through the Graph API.

Upvotes: 0

Related Questions