开发者

Only 2 friends are getting tagged - Facebook/Graph API

开发者 https://www.devze.com 2023-03-12 05:10 出处:网络
This is my code. It does not show any errors but only the first 2 friends are tagged! for ($i=0;$i<count($friendsID);$i++)

This is my code. It does not show any errors but only the first 2 friends are tagged!

for ($i=0;$i<count($friendsID);$i++)
{
 $post_url = "https://graph.facebook.com/".$upload_photo['id']."/tags/".$friendsID[$i]."?access_token=".$token."&x=80&y=".$y."&method=POST";
 $response = file_get_contents($post_url);
 $post_url = urlencode($post_url);
 $response = file_get_contents($post_url);
 $开发者_StackOverflow社区y = $y + 53;
}


This is because The variable $x and $y should be les than 100 always, when you are running the loop their value increases 100 which causes problems.


Check to make sure the accounts you are trying to tag allow you to check them into places in their facebook account settings page. How many friends are you expecting to be tagged?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号