php - Cannot get back the total count of friends - Facebook -
i user php facebook api
facebook's user data. , trying total friends.
i using graph api
, return this:
{ "id": "12312312312312", "name": "myname", "friends": { "data": [ ], "summary": { "total_count": 89 } }
}
but when use code:
$profile_request = $fb->get('/me?fields=name, friends'); $profile = $profile_request->getgraphnode()->asarray(); print_r($profile); //it return these me: array ( [name] => myname [friends] => array ( ) [id] => 12346677888 )
the friend array return null value me.
how can total count
?
thx helping
facebook v2.0 upgraded can try "user_friends".
Comments
Post a Comment