How can I tag a user in the caption of a photo uploaded using Facebook's PHP SDK?
The question says it all. I followed this tutorial:
And I managed to do it. Now I want it so that whenever someone uploads a photo, the user is tagged in the caption of the photo--just in the caption, so anyone viewing my page can know who the user was that uploaded the picture. Can this be done?
I think this has already been answered here: How can I tag friends in uploaded photo using facebook php SDK
Like its stated there check the documentation for how to use tags here: https://developers.facebook.com/docs/reference/api/photo/#tags
Just doing this in my head from scratch (not tested)
$photo = $facebook->api($album_id . '/photos', 'post', $args); $argstag = array('to' => $user); $datatag = $facebook->api('/' . $photo['id'] . '/tags', 'post', $argstag);