0

Possible Duplicate:
Facebook Profile Subscriber Count

Is there any way to get number of facebook profile subscribers, but without any access token or something like that? For example, at my facebook profile I have 500 subscrbiers. I want to return this number with PHP, but without any access token or something like that. Is this possible? If yes, how?

Community
  • 1
  • 1
Alexander
  • 153
  • 2
  • 15

1 Answers1

2

You can't get a user's subscriber count without a valid access token that has at least the user_subscriptions or friends_subscriptions permission.

Once you have that, you can get a user's subscriber count with this code:

<?php
$fburl = 'https://graph.facebook.com/USERNAME_OR_ID/subscribers/'
$fbac = 'ACCESS_TOKEN'
$result = json_decode( file_get_contents($fburl.'&access_token='.$fbac ) );
printf('You have %d subscribers', $result->summary->total_count );
cpilko
  • 11,792
  • 2
  • 31
  • 45