在分享帖子到我的墙上时,我收到完整帖子的链接,而我想显示共享帖子标题和图片的URL。一切正常,除了链接部分。
$result = $facebook->api('/me/feed/', 'post',
array('name' => $_POST['title'],
'link' => 'http://myurl.com',
'picture' => $_POST['imgPath'],
'caption' => 'post title',
'description' => $_POST['description']));
请建议。
答案 0 :(得分:0)
Try by removing '/' after feed ..
$result = $facebook->api('/me/feed', 'post',
array('name' => $_POST['title'],
'link' => 'http://myurl.com',
'picture' => $_POST['imgPath'],
'caption' => 'post title',
'description' => $_POST['description']));
or you can use userid instead of me..
$user=$facebook->getUser();
$result = $facebook->api('/$user/feed', 'post',
array('name' => $_POST['title'],
'link' => 'http://myurl.com',
'picture' => $_POST['imgPath'],
'caption' => 'post title',
'description' => $_POST['description']));