node ninja
node ninja

Reputation: 33026

How to modify sample Heroku facebook app to show friend's likes

In the sample app that Heroku starts you out with when you make a Facebook php app, there's this line.

$likes = idx($facebook->api('/me/likes?limit=4'), 'data', array());

This will get 4 of my likes and store them in an array. But what I want to do is get 4 things that my friend likes.

I tried replacing "me" with the id of a friend, but it didn't work. What changes do I have to make to fetch my friend's likes?

Upvotes: 1

Views: 786

Answers (1)

ifaour
ifaour

Reputation: 38135

You obviously need the friends_likes permission. Here's an official tutorial on how to pull the movies your friends' like.

Upvotes: 3

Related Questions