php – Get Facebook Followers Count (2018)


Until the recent changes in Facebook policies, it was possible to create a WWW application and get the number of subscribers in the following way:

function getFacebookFollowers($page, $appid, $appsecret) {

    $json_url =''.$page.'?access_token='.$appid.'|'.$appsecret.'&fields=likes';

    $json = file_get_contents($json_url);
    $json_output = json_decode($json);

    if ($json_output->likes) {
        $likes = (intval($json_output->likes) > 1) ? intval($json_output->likes) : 0;
        return $likes;
    else {
        return 0;


This option does not work at the moment. Is there another "easy" method to get the subscriber column, given that most of the pages are inaccessible without logging into the social network?

PS: You also need to take into account that followers and likes for Facebook groups are 2 different columns.


Your option was valid a couple of months ago, but due to the new privacy policy, only community administrators have access.

There are practically no alternative ways, except for how: to make a bike by direct authorization to receive cookies, and, with these cookies, make requests to a specific page, from where it will be possible to parse data on the number of participants and other information.

Scroll to Top