Reputation: 582
I want to integrate the number of likes that I have in my website with the number of likes that I have in my facebook application, so for example if user clicks on my site like button and another user click on my facebook page like, the total likes that I will see on both the applications(site and facebook) will be 2. My question is is this possible at all or thous are 2 separate objects and it is not possible to sum there likes
Thanks
Upvotes: 1
Views: 582
Reputation: 4439
You can find the like count of your website by running the following FQL query:
SELECT like_count FROM link_stat WHERE url="yourwebsiteurl"
Then, you can get the like count of your app in one of two ways. If the like button for your app points to its apps.facebook.com address, use the same query as above, with its app URL instead of your website URL.
If the likes for your app are from a Page associated with the app then you should make a Graph API call to:
https://graph.facebook.com/YOURPAGEID?fields=likes
This will give you the like count for each object, now you just need to sum them.
Upvotes: 2