开发者

@myusersname on Mysite (Facebook)

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) {  }
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜