My users are able to update their Facebo开发者_运维百科ok status by Graph API (in PHP), How can we do "@myusersname on Mysite" like Twitter?
i.e. picture @ http://i.stack.imgur.com/60F14.png
You do that using the action parameter
$attachment = array(
'message' => 'USERS_MESSAGE', // NB: this cannot be prefilled
'name' => 'NAME',
'caption' => 'CAPTION',
'link' => 'http://mysite.com',
'description' => 'DESCRIPTION',
'picture' => 'http://mysite.com/mysiteimage.jpg',
'actions' => array(array(
'name' => '@myusersname on Mysite',
'link' => 'http://mysite.com/myusernsme' ))
);
try { $result = $facebook->api('/me/feed/', 'post', $attachment); } catch (Exception $e) { }
精彩评论