无法以测试用户身份发布开放图操作
我已经能够使用自己的帐户发布开放图操作,但我无法作为应用程序的测试用户执行相同的操作,收到此错误:
OAuthException:发生意外错误。请重试您的 稍后请求。
我已经测试了与调试器一起使用的访问令牌,效果很好。
这是我正在使用的代码 - 我很确定代码没问题,因为当我以自己的身份登录时它可以工作:
$token = $this->facebook->getAccessToken();
$params = array(
'access_token' => $token,
'{object}' => 'http://samples.ogp.me/{objectID}',
);
try
{
$result = $this->facebook->api('/me/{namespace}:{action}', 'POST', $params);
echo $result;
}
catch(FacebookApiException $e)
{
echo $e;
}
这个问题: 无法使用测试用户通过开放图谱发布似乎有类似的问题,但发布的修复对我不起作用(我尝试通过角色部分创建测试用户,并且通过图表应用程序编程接口)。
有没有人能够在以测试用户身份登录时发布操作?
I've been able to post Open Graph actions using my own account, but I'm unable to do the same as a Test User of the application, receiving this error:
OAuthException: An unexpected error has occurred. Please retry your
request later.
I've tested the access token that I'm using with the debugger and it's fine.
Here's the code I'm using - I'm pretty sure the code is fine, because it works when I'm logged in as myself:
$token = $this->facebook->getAccessToken();
$params = array(
'access_token' => $token,
'{object}' => 'http://samples.ogp.me/{objectID}',
);
try
{
$result = $this->facebook->api('/me/{namespace}:{action}', 'POST', $params);
echo $result;
}
catch(FacebookApiException $e)
{
echo $e;
}
This question: Unable to use Test Users for posting through Open Graph seems to have a similar problem, but the fix posted doesn't work for me (I've tried creating test users through the Roles section, and via the graph API).
Has anyone been able to post actions when logged in as a test user?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到的问题是由于在“应用程序设置”>“沙盒模式”中将“沙盒模式”设置为“启用”引起的。先进的。
以下页面建议在测试应用程序时启用沙盒模式,但测试用户无法在沙盒模式下发布开放图操作。
http://developers.facebook.com/docs/ApplicationSecurity/
The problem I was having was caused by setting 'Sandbox Mode' to 'enabled' in App Settings > Advanced.
The following page suggests enabling Sandbox Mode when testing the app, but Test Users can't publish Open Graph actions in Sandbox Mode.
http://developers.facebook.com/docs/ApplicationSecurity/