Facebook应用程序照片标记

时间:2012-03-10 07:41:39

标签: facebook codeigniter facebook-graph-api

从我的应用程序上传照片时,我收到此错误:

  

致命错误:未捕获OAuthException:(#100)无法指定没有抛出地点标记的用户标记

通过这个我得到了照片标签id数组

$friends = $this->facebook->api('/me/friends');
shuffle($friends['data']);
$arr = array();
$i = 0;
foreach($friends['data'] as $friend) {
    $arr[''.$i.'']['tag_uid'] = $friend['id'];
    $arr[''.$i.'']['x'] = '11';
    $arr[''.$i.'']['y'] = '12';
    $i++;
    if ($i == 25) {
        break;
    }
}

这是上传照片

$photo_details = array(
    'message'=> '' . $image_name['image_caption'] . ' for more LoL Images check out - http://lolsharing.com/',
    'tags'=> $arr
);

$photo_details['image'] = '@' . realpath('' . FCPATH . 'assets/joke_images/' . $image_name['image_name'] . '');

$upload_photo = $this->facebook->api('/' . $create_album['id'] . '/photos', 'post', $photo_details);

以前工作正常,但我不知道为什么它现在不起作用。 请帮我解决一下这个。

非常感谢你。

1 个答案:

答案 0 :(得分:2)

如下所述:

Photo Uploading not working for the last two days

显然现在Graph API需要在你标记某人时指定一个地方值:非常愚蠢,恕我直言,因为网站没有相同的限制。

相关问题