我在标记帖子中的人员时遇到了一些严重问题。我现在正在使用CakePHP并使用FB API将POST发布到Graph API。下面的代码:在POST帖子中添加帖子到Facebook图表API
$theMsg1 = $this->Connect->user('name').' tagged ';
$theMsg2 = $friendName.' on the IF Tag website.';
$msg1Len = strlen($theMsg1);
$fbNameLen = strlen($friendName);`
$fbcall = FB::api($fbID.'/feed', 'POST', array(
'name' => $theTag['Tag']['name'],
'caption' => 'IF Tag is an application that allows you to interact with people on Facebook.',
'message' => $theMsg1.$theMsg2,
'message_tags' => array(
$msg1Len => array(
'id' => $friendID,
'name' => $friendName,
'offset' => $msg1Len,
'length' => $fbNameLen
),
'picture' => 'http://patronsocialclub.com/img/global/head/drinkmaker.gif',
'link' => 'iftag.local'
)
));
据我了解和我读过,我应该使用message_tags对象标记在后的人,但它不工作。它不会给出任何错误,只是不标记。
我也尝试使用@[{userid}:1:{username}]
从我见过的其他帖子,但似乎不适用于当前的API迭代。
任何人都有任何线索? –