How does one retrieve the fan_count for a Facebook application page using the Graph API?

前端 未结 2 402
迷失自我
迷失自我 2021-01-26 16:45

I need to retrieve the number of fans for a given Facebook application. Using the GraffitiWall application example in the Facebook Graph API, that page displays a fan total numb

2条回答
  •  悲哀的现实
    2021-01-26 17:15

    You can also get fan_count using the REST API:

    % wget https://api.facebook.com/method/pages.getinfo?access_token=[...]&fields=fan_count,name&page_ids=2439131959&format=json
    [{"page_id":2439131959,"name":"Graffiti","fan_count":1263811}]
    

    as described in the Facebook Developer wiki.

提交回复
热议问题