Search code examples
facebookfacebook-fqlfacebook-opengraph

How to query the like count of a facebook object such as a album or photo via fql?


Here is a tricky question, how do you get the like count of a facebook object such as an album or a photo? I know that facebook has a fql table called link_stat that allow you to get the like count for an external url, but it does not seem to work if the object is within facebook. If you access the likes via the opengraph api on a particular object, it will only return a maximum of 4 users that like the object, even though there maybe a few thousand users that like it. Any clues?


Solution

  • I was able to do this by changing privacy settings. If you query the tables for the likes of XYZ user it will not return the data until and unless the user has set the Visibility to friends (for photo, album, video, link or a note) no matter if you have asked for the permissions( from within your application).

    So for instance I am XYZ user and i liked a certain link posted by my GHI. and i use the application developed for Facebook and Allow access to my links. now if the application tries to access links that i have liked on Facebook the application will not be able to get the link posted by GHI (that i liked) until and unless the GHI has set the visibility of his her links to Friends.

    if any one needs more help on this then get back on this forum.

    regards, Haroon