Yes, likes don't have an ID in the Graph API. You like or unlike an item by POSTing or DELETEing to {item_id}/likes
, where {item_id}
is replaced by the ID of the object you're liking/unliking.
To find out what the current user has liked (so you can delete them appropriately), you can use the "likes" connection of the User object (docs). So, if you request http://graph.facebook.com/me/likes
, you'll get a list of pages/people/whatever that a user has liked. (Note: this does not include posts or photos or things like that)
This will return an array of data full of items like this:
{
"name": "Very Hungry Caterpillar",
"category": "Artist",
"id": "29956247793",
"created_time": "2009-03-27T15:48:29+0000"
}
The ID in there is not the ID of the like. It is the ID of the object that the user has liked, so in order to un-like it, you have to make a DELETE to http://graph.facebook.com/29956247793/likes
.