views:

1560

answers:

3

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?

A: 

"SELECT fan_count, page_url FROM page WHERE page_id=12345"

McLaughlin
Seriously? Just repeating what I questioned?
Ryan McGeary
That tickled me :)
RobertPitt
A: 

How about another question? I think your post almost answers what i'm trying to do, but i'm not a programmer just trying to find some data to present to my programmer for implementation. I'd like to include a within the footer of my website a "facebook fan count". I believe this will add an incentive to users considering clicking our facebook icon. "join XXXX fans on our facebook page" for example. I want the XXXX to be automatically populated with our facebook fan count. I want to do the same with twitter. Any insight you can provide would be helpful.

Thanks

Sam Beamond
+2  A: 

https://graph.facebook.com/cocacola

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

Typeoneerror
Thanks. It required Facebook to build a whole new API to support answering this question ;-)
Ryan McGeary

related questions