Mahesh
Mahesh

Reputation: 1593

Graph API - How to get friends name for their like id?

I tried to get feed from user account. I am able to get the feeds from the following command.

$feed = $fb->get('/me/feed?fields=comments,likes', $access_token );

I can get the comments with ID and Name
But the likes are only giving ids of friends/users.

How do i get the users' name who liked that post?

Upvotes: 0

Views: 434

Answers (1)

andyrandy
andyrandy

Reputation: 73984

For the names for likes: /me/feed?fields=comments,likes{id,name}

You do get the names for comments already, just debug the response of your API call. There is a "comments" field with "data > from".

Upvotes: 1

Related Questions