Reputation: 1
Can any one tell me that, is the id of taggable friends are dynamic in nature? Why I am saying is, each and every time when I run the program to collect my facebook taggable friends using
get('/me/taggable_friends?fields=name&limit=100')
I got different id's [Like the set of id's are attached here set-1 http://pastebin.com/fjUmCgJY and set-2 http://pastebin.com/RpTZswc6 for same set of taggable friends] while running the following code two time.
if ($fb->next($friends)) {
$allFriends = array();
$friendsArray = $friends->asArray();
$allFriends = array_merge($friendsArray, $allFriends);
while ($friends = $fb->next($friends)) {
$friendsArray = $friends->asArray();
$allFriends = array_merge($friendsArray, $allFriends);
}
$array1 = json_encode($allFriends, true);
//foreach ($allFriends as $key) {
//echo $key['name'] . "<br>";
//}
echo ($array1);
//echo count($allFriends);
} else {
$allFriends = $friends->asArray();
$totalFriends = count($allFriends);
$array1 = json_encode($allFriends, true);
/*foreach ($allFriends as $key) {
echo $key['name'] . "<br>";
}*/
echo ($array1);
}
Another observation is that, while executing my code, sometimes I got the result but some times I got
Fatal error: Call to a member function bind_param() on boolean in
What is the reason?
Upvotes: 0
Views: 969
Reputation: 74004
You only get a "Tagging Token" with taggable_friends
, there is no way to get a User ID. You are only allowed to use taggable_friends
for tagging, so there is no need to get a User ID anyway.
If you want to get access to friends for something else, i suggest reading the answer in this thread: Facebook Graph Api v2.0+ - /me/friends returns empty, or only friends who also use my app
Upvotes: 2