2011-03-17 51 views
1

如何在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安全性被禁用

+0

我hopy這只是錯字,當你寫$ attachment$ title$ link? – bensiu 2011-03-17 00:59:49

回答

0

我認爲如果您將「http://」添加到鏈接,它們將是可點擊的,至少在說明中。

+0

我試過http://,www,HTML標籤和FBML標籤..不工作:(謝謝 – 2011-03-19 07:10:11

1

如果添加「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') 
     ) 
); 
相關問題