Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API - "All my likes" query

Tags:

facebook

api

Is it possible to retrieve all the posts, user ever 'liked'?

FQL? API? I could not find a way. FB gurus out there, your help would be appreciated.

like image 255
ohnoes Avatar asked Aug 24 '09 13:08

ohnoes


2 Answers

Use the Stream.get API call.

If you specify only one user ID in the source_ids array, you can return the last 50 posts from that user's profile stream (Mini-Feed) for the last 180 days. If you specify more than one user ID in the source_ids array, you can return posts in those streams only from the last 9 days.

You can make FQL calls to retrieve likes from the stream table:

SELECT likes FROM stream WHERE source_id = [user_id] 

This will return the user's likes for the last 180 days.

like image 143
Pierre-Antoine LaFayette Avatar answered Oct 14 '22 17:10

Pierre-Antoine LaFayette


I was trying to find out the videos (Youtube and Howcast) that either I liked or posted or shared. Here is the FQL, see if it can be useful to someone:

fql?q=SELECT post_id, actor_id, target_id, message, attachment, permalink, likes
      FROM stream
      WHERE filter_key in ('other', 'owner')
        AND is_hidden = 0 AND (attachment.caption = 'www.youtube.com'
        oR attachment.caption = 'www.howcast.com' )
like image 33
Yogesh G Avatar answered Oct 14 '22 15:10

Yogesh G