Facebook:我如何使用访问令牌来标记照片

时间:2012-09-23 21:45:53

标签: facebook facebook-graph-api

下面的代码成功上传了照片,但是当我尝试标记时,我收到以下错误:

  

未捕获的OAuthException:无效的OAuth访问令牌签名

如何使用accesstoken标记照片?

$photo = $facebook->api('/'.$aid.'/photos', 'POST', $attachment);


$tags['access_token'] = $access_token;
$tags = array(
  'tag_uid'=> $re[0],
  'x'      => '30',
  'y'      => '60',
);
$response = $facebook->api('/'.$photo['id'].'/tags', 'POST', $tags);

1 个答案:

答案 0 :(得分:0)

你错过了“to”参数

https://developers.facebook.com/docs/reference/api/photo/#tags

 $tags['access_token'] = $access_token;
 $tags = array(
 'to' => $user,
 'tag_uid'=> $re[0],
 'x'      => '30',
 'y'      => '60',
);
$response = $facebook->api('/'.$photo['id'].'/tags', 'POST', $tags);