C.Z.
C.Z.

Reputation: 11

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

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 disabled

Upvotes: 1

Views: 3494

Answers (2)

Marcin Majchrzak
Marcin Majchrzak

Reputation: 682

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

Upvotes: 1

kevin
kevin

Reputation: 467

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

Upvotes: 0

Related Questions