1

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.

Note, I dont want to include the whole FB widget, just need the fan count for this purpose.

Thanks

neo
  • 1,260
  • 11
  • 22

4 Answers4

1

You can get the fan count of a page via their API using Pages.getInfo found here.

Or using FQL:

select fan_count from page where page_id = [ID of Fan Page]

For Twitter you can get the followers_count from this call of users/lookup found here.

Bryan Denny
  • 27,363
  • 32
  • 109
  • 125
0

Do the following FQL query to the facebook api:

select fan_count from page where page_id = <FAN_PAGE_ID>

For twitter you need to extract it from a user query.

neo
  • 1,260
  • 11
  • 22
0

https://graph.facebook.com/cocacola

"fan_count" property. replace "cocacola" with your page ID.

typeoneerror
  • 55,990
  • 32
  • 132
  • 223
0

FaceBook Graph API

http://developers.facebook.com/docs/api#selection

the new Graph api should work for you..

Replace the "devilsworkshop.org" with your page name and then try opening page

https ://graph.facebook.com/devilsworkshop.org

It will return a object with fan_count as its member.