Reputation: 5316
Is their any alternate php code for sharing link on Facebook. I'am using this code for sharing a link on facebook wall.
$ret_obj = $this->facebook->api('/me/feed', 'POST', array(
'link' => 'www./excample.com',
'message' => 'Posting with the PHP SDK!'
));
echo '<pre>Post ID: ' . $ret_obj['id'] . '</pre>';
Upvotes: 2
Views: 4434
Reputation: 5316
Instead of `feed` use `links`
$ret_obj = $this->facebook->api('/me/links', 'POST', array(
'link' => 'www./excample.com',
'message' => 'Posting with the PHP SDK!'
));
Upvotes: 5
Reputation: 907
You can use the /links endpoint : https://graph.facebook.com/me/links
Use a post request with "link" parameter.
Cheers!
Upvotes: 3