开发者

@myusersname on Mysite (Facebook)

开发者 https://www.devze.com 2023-03-24 17:16 出处:网络
My users are able to update their Facebo开发者_运维百科ok status by Graph API (in PHP), How can we do \"@myusersname on Mysite\" like Twitter?

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

精彩评论

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