开发者

how to post a link in facebook (with post method graph api )

开发者 https://www.devze.com 2023-02-17 12:55 出处:网络
How can I add a link in the description (or in the \'caption\') of a POST? I tried : $attachment = array (

How can I add a link in the description (or in the 'caption') of a POST?

I tried :

$attachment = array (
                      'name' => $title,
                      'link' => $link,
                      'description' => "www.google.it",
                      'caption' => "www.google.it"
                     );
$this->facebook->api("/$uid/feed", 'POST', $attachment);

.... the links are published as texts, not as clickable links. I use the /PROFILE_ID/feed method and Stream post URL security in my application security settings is di开发者_如何学JAVAsabled


If you add "http://" it will work in [message] and in [actions]. Why it doesn't work in [caption] or [description]? I'd also like to know it.

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


I think if you add "http://" to the links they will be clickable, at least in the description.

0

精彩评论

暂无评论...
验证码 换一张
取 消