[英]How to tag multiple people in facebook post (facebook api php)
Hello this is my code and i have an array where i have all the id's of the users that i need to tag, how do i tag all of them, i'm using Yii framework, thanks in advance 您好,这是我的代码,我有一个数组,其中有我需要标记的所有用户ID,如何标记所有用户的ID,我使用的是Yii框架,请提前感谢
public function actionSendD(){
$response = $facebook->api()->api("/me/feed", "post",
array(
'message' => "hello, somebody has sent you a gift in our paget",
'picture' => CController::createAbsoluteUrl( str_replace("index.php/", "", Yii::app() -> theme -> baseUrl) .'/img/logo.png'),
'link' => "http://www.xxxxxxxx.com",
'name' => "gift",
'caption' => "enjoy",
'place' => "452157938259984",
));
$this->redirect(array('Gift/index'));
}
Try this code. 试试这个代码。
I am adding tags
in your array which have comma separated friends ids. 我在您的数组中添加了以逗号分隔的朋友ID的tags
。
public function actionSendD(){
$response = $facebook->api()->api("/me/feed", "post",
array(
'message' => "hello, somebody has sent you a gift in our paget",
'picture' => CController::createAbsoluteUrl( str_replace("index.php/", "", Yii::app() -> theme -> baseUrl) .'/img/logo.png'),
'tags' => '1234567890123,123456767890321', // comma separated friends ID's
'link' => "http://www.xxxxxxxx.com",
'name' => "gift",
'caption' => "enjoy",
'place' => "452157938259984"
));
$this->redirect(array('Gift/index'));
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.