如何在我上传的带有图形API的照片中插入链接


How can i insert a link in my uploaded photo with graph API

我可以上传照片并使用Graph API包含链接吗?我只想像Instagram应用程序一样添加一个原始帖子的链接。我希望它看起来像这样:

picture-name -- http://myhost.com/link/to/original/post

我的代码是:

$post_link = get_permalink($post_id);
$file='sample.jpg';
$photo_details = array(
    'message'=> 'Photo message',
    'source' => '@' . realpath($file)
);
$upload_photo = $facebook->api('/'.$album_uid.'/photos', 'post', $photo_details);

我可以将我的图片上传到facebook相册,但我想在Photo message的右侧包含我的帖子链接。

你的意思是你只需要像这样把链接附加到当前消息上吗?

   $post_link = get_permalink($post_id);
   $file='sample.jpg';
   $photo_details = array(
   'message'=> 'Photo message - '.$post_link,
   'source' => '@' . realpath($file)
     );
   $upload_photo = $facebook->api('/'.$album_uid.'/photos', 'post', $photo_details);