Greetings
Here's what's up:
I'm working on an app where the user or a page they administrate is tagged in their own image, however, tagging a page they administrate doesn't function, I have no trouble with the user being tagged.
Here's some code:
$tdata = array('tag_uid' => $fb_id,'x' => 0,'y' => 0);
$datatags[] = $tdata;
$attachment = array(
'access_token' => $access_token,
'tags' => $datatags
);
$attachment['image'] = '@'.realpath($image_name.);
$result = $facebook->api('/'.$album_id.'/photos', 'POST', $attachment);
$fb_id
is either the ID for the u开发者_JS百科ser or the page. which is grabbed using /me/accounts
in the Graph API
Thanks!
Per the documentation you cannot do this:
You can specify which user to tag using two methods: in the URL path as PHOTO_ID/tags/USER_ID, or in a URL parameter as PHOTO_ID/tags?to=USER_ID. Currently, you cannot tag a Page in a photo using this API.
https://developers.facebook.com/docs/reference/api/photo/
精彩评论