Facebook FQL is deprecated, but there is no way to directly get friend_count using the Graph API?

Using FQL, I can easily get a friend’s friend score with:

SELECT uid,friend_count FROM user WHERE uid IN (<list of user ids/>)

But it looks like using the Graph API, I have to make requests until the pagination ends, and then calculate how many results were returned using something like:

array(
    'method' => 'GET',
    'relative_url' => 'me/friends?access_token='. $token
)

I tried to use

array(
    'method' => 'GET',
    'relative_url' => 'me/friends?summary=true&access_token='. $token
)

but it didn’t work. Is there a single Graph API request that can count a user counter? If not, how do I make a function request?

+4
source share
1 answer

Facebook has implemented this feature for the Graph API since the release of version v2.1:

/friends edge User . 2.0.

Graph-API-v2.1

+3

Source: https://habr.com/ru/post/1545907/


All Articles