0

There seem to be many many unanswered questions about this. Hopefully, I'll get lucky with this one :)

When someone clicks "Like" on a particular page, a post shows up in their stream that says "xxxxxx likes a link" along with data about that link. How can I use FQL to get this data -


1. For the logged in user
2. For friends of the logged in user

NOTE:
1. I am not talking about facebook pages (in which case you become a "fan"). I know that you can access this with the page_fan table or even the connection table.

2. One of the many issues seems to be that you cannot query the like table for anyone but the current user. (Graph API for like gives you a list of FAN PAGES - not what I want)

3. Even if you query the like table for the current user, you only get a list of posts/videos shared by friends that have been liked by the current user. Not pages outside facebook.

3. I can get shared links by looking at the link table. But I want the list of pages where a user has clicked "Like" or "Recommend" using the facebook like button for the site.

asdfee33
  • 3
  • 3
  • 1
    Possible duplicate: http://stackoverflow.com/questions/3546320/how-to-list-facebook-users-who-like-a-page-or-interest –  Sep 08 '11 at 01:37
  • The short answer from the above duplicate is: you can't get any info about friends who have liked particular items. –  Sep 08 '11 at 01:40

1 Answers1

1

Query the url_like FQL table with your user ID. For example: SELECT url from url_like where user_id = me().

You can do this for friends of the current user as well. See the FQL url_like table documentation for details.

Dhiren Patel
  • 645
  • 4
  • 6
  • Wait, was that table there all along? I just feel plain stupid not having seen that before! Anyway, thanks a lot! One question though. This does not work. Seems to be taking forever. `select url from url_like where user_id in (select uid1 from friend where uid2 = me()) limit 50` – asdfee33 Sep 08 '11 at 04:45
  • I think it's a relatively new table. Not sure why you're seeing the long wait; I'm getting an error myself, so I'll look into this. The simple query that I posted does work for me, though. – Dhiren Patel Sep 08 '11 at 05:30
  • Yes, it works perfectly when I ask for me() or for a specific friend. Thanks for checking up on this for multiple friends (with a limit of course) – asdfee33 Sep 08 '11 at 06:08
  • It appears to be a bug. I've filed it. – Dhiren Patel Sep 08 '11 at 22:26