如何在facebook上发布链接(使用post method graph api)
问题描述:
如何在POST
的描述中(或在'标题'中)添加链接?如何在facebook上发布链接(使用post method graph api)
我想:
$attachment = array (
'name' => $title,
'link' => $link,
'description' => "www.google.it",
'caption' => "www.google.it"
);
$this->facebook->api("/$uid/feed", 'POST', $attachment);
....链接被发布为文本,而不是可点击的链接。 我使用/ PROFILE_ID/feed方法和流应用程序安全设置中的URL安全性被禁用
答
我认为如果您将“http://”添加到链接,它们将是可点击的,至少在说明中。
+0
我试过http://,www,HTML标签和FBML标签..不工作:(谢谢 – 2011-03-19 07:10:11
答
如果添加“http://”,它将在[消息]和[actions]中起作用。为什么它在[说明]或[说明]中不起作用?我也想知道它。
$attachment = array(
'access_token'=>TOKEN_HERE,
'message' => 'http://www.example.com/',
'name' => 'name_here',
'caption' => 'caption_here',
'description' => 'description_here',
'picture' => 'http://www.example.com/image.jpg',
'actions' => array(
array('name' => 'http://www.example.com', 'link' => 'link')
)
);
我hopy这只是错字,当你写
$ attachment
,$ title
,$ link
? – bensiu 2011-03-17 00:59:49