即时尝试使用php sdk重命名选项卡,但即时收到此错误
致命错误:未捕获OAuthException:(#100)选项卡'591882604157641'在第1028行的base_facebook.php中引发的配置文件216407665045740上不存在
216407665045740 是有效网页 591882604157641 是标签页并正确安装在该页面上!
http://www.facebook.com/pages/My-test-page/216407665045740?id=216407665045740&sk=app_591882604157641
这就是我正在做的事情:
这是代码:
$page_id = $signed_request['page']['id'];
$user_access_token = $facebook->getAccessToken();
$page_access_token = $facebook->api("/{$page_id}?fields=access_token");
$page_access_token = $page_access_token['access_token'];
if($facebook->setAccessToken($page_access_token))
{
$facebook->api("/{$page_id}/tabs/591882604157641", 'POST', array(
'custom_name' => 'another test name'
));
}
$facebook->setAccessToken($user_access_token);
我尝试了一切,但是我被困在这里! thx很多任何帮助!
答案 0 :(得分:0)
我找到了重命名标签的方法。
$facebook->api("/{$page_id}/tabs/app_591882604157641", 'POST', array(
'custom_name' => 'another test name'
));
只需在应用ID之前添加 app _ !
答案 1 :(得分:0)
$page_id = $signed_request['page']['id'];
$user_access_token = $facebook->getAccessToken();
$page_access_token = $facebook->api("/{$page_id}?fields=access_token");
$page_access_token = $page_access_token['access_token'];
if($facebook->setAccessToken($page_access_token))
{
$facebook->api("/{$page_id}/tabs/app_591882604157641", 'POST', array(
'custom_name' => 'another test name'
));
}
$facebook->setAccessToken($user_access_token);
作品非常精致