Facebook Graph API Read Followers Count

Using the Facebook API or other means, is there currently a way to calculate the number of user users? You think that it will be a simple readable metric field at the user level, but after several hours of searching I can not find such a field.

I know that Facebook considers the concept of followers to be valid, because they have a working edge for it with its web interface, https://www.facebook.com/user_name/followers , as well as listing the account on the user's main page (see example image below).

Of course, it seems that the ability to read, or at least output, subscriber counters previously existed in the form of reading a subscriber list for a user, but is now deprecated . An alternative method, apparently, was to use FQL to query data. This method is also now deprecated . And there are stackoverflow questions about this, a good example here , but they seem to relate to previous features that are no longer available.

Example from Facebook user page

+7
facebook-graph-api
source share
4 answers

According to the docs, there is no way to get followers count: https://developers.facebook.com/docs/graph-api/reference/user

Subscribers endpoint has already been deleted using v2.0: https://developers.facebook.com/docs/apps/changelog#v2_0

Other topics related to one topic:

  • how to get list of subscribers from facebook account on api schedule?
  • facebook graph api to get the counter of subscribers from another account
+5
source share

If you have access_token, you can call {profile-id} / insights / page_fans_country and get the number of people who like aggregated by country. This works for any public profile.

https://graph.facebook.com/{profile-idasket/insights/page_fans_country? access_token = {access-token}

Then you could summarize countries to get the total number of followers. If you need to get followers for your profile, you can call page_fans, which provides the total number of people who liked your page.

+2
source share

You can use fan_count:

{ "id": "235014179868339", "name": "Zoella", "fan_count": 2647287 } 

Google Graph API

+1
source share

This is an updated and working piece of code that can be used to retrieve Facebook, for example, to count a specific page. To use this piece of code, you will need a Facebook application identifier and a secret key. This is used in version 2.8 of the API version.

enter image description here

Step 1:

Go to https://developers.facebook.com/ to log in to your facebook account. If you do not have it, you need to create it.

Step 2:

Created an application from the facebook developer.

Step 3:

You must get the App ID and App Secret from the application you created.

enter image description here

Step 4:

PHP code to get facebook as page count.

 <?php function fbLikeCount($id,$appid,$appsecret){ $json_url ='https://graph.facebook.com/'.$id.'?access_token='.$appid.'|'.$appsecret.'&fields=fan_count'; $json = file_get_contents($json_url); $json_output = json_decode($json); //Extract the likes count from the JSON object if($json_output->fan_count){ return $fan_count = $json_output->fan_count; }else{ return 0; } } echo fbLikeCount('coregenie','___APPID___','___APPSECRET___'); ?> 

Change the name of your page, application identifier, application secret.

This method works. Tested on 12/19/2017

0
source share

All Articles