Getting the last date user clicked like on anything on Facebook
I'm develo开发者_如何学编程ping 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!
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.
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.
精彩评论