Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fan count for a Facebook Fan Page

I needed to pull the fan count for particular fan pages on Facebook. After digging through the API, I couldn't find a way to do this with the API "proper." Instead I fell back to a FQL query, and it worked quite well.

select fan_count from page where page_id = <FAN_PAGE_ID>

What did I miss about the Facebook API. Is this the only way to capture a fan count for a page? In general, how often do you use FQL for your requests as opposed to the exposed API methods?

like image 697
Ryan McGeary Avatar asked Feb 03 '23 07:02

Ryan McGeary


1 Answers

https://graph.facebook.com/cocacola

"fan_count" property. replace cocacola with your fan page's ID.

Please note that this property is being changed to "likes" in the November 2010 Roundup migration:

Graph API: The fan_count attribute on the Page object will be renamed to likes.

You can opt in to the November Roundup in your application's advanced settings page.

like image 53
typeoneerror Avatar answered Feb 13 '23 06:02

typeoneerror