如何在facebook中发布链接(使用post方法图api)

时间:2011-03-17 00:47:12

标签: php facebook post facebook-graph-api

如何在POST的说明(或“标题”)中添加链接?

我试过了:

$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安全性

2 个答案:

答案 0 :(得分:1)

如果添加“http://”,它将在[消息]和[操作]中有效。为什么它在[标题]或[描述]中不起作用?我也想知道。

$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')
        )
);

答案 1 :(得分:0)

我认为如果您在链接中添加“http://”,它们将是可点击的,至少在说明中是这样。