如何授权应用程序发布到 Facebook 用户墙?
我正在使用 GAE、Python 和 Facebook-Python SDK 来构建应用程序。我已经可以正常登录 FB,当然还设置了 Facebook 应用程序,现在我正在尝试使用 Graph API 从应用程序在我的墙上发布消息。
当我尝试 POST 到 Facebook 时,我收到响应:
GraphAPIError: (#200) The user has notauthorized the application to执行此操作
我如何授权应用程序执行该操作?当我通过 Facebook 登录我的应用程序时,最初被要求“允许”应用程序权限。我还缺少另一个步骤吗?
更新:也许我没有请求访问发布流?
这是我的登录过程的 javascript:
window.fbAsyncInit = function() {
FB.init({appId: '{{ facebook_app_id }}', status: true, cookie: true,
xfbml: true});
FB.Event.subscribe('{% if current_user %}auth.logout{% else %}auth.login{% endif %}', function(response) {
window.location.reload();
});
};
我还需要调用 FB.login 吗?
I'm using GAE, Python and the Facebook-Python SDK to build an application. I've got FB login working, have a Facebook Application set up of course and am now trying to use the Graph API to post a message on my Wall from the app.
When I attempt to POST to Facebook I get the response:
GraphAPIError: (#200) The user hasn't authorized the application to perform this action
How do I authorize the application to perform that action? When I log into my application via Facebook, I was initially asked to "allow" the application rights. Is there another step I am missing?
UPDATE: perhaps I am not requesting access to the publishing stream?
Here is my javascript for the login process:
window.fbAsyncInit = function() {
FB.init({appId: '{{ facebook_app_id }}', status: true, cookie: true,
xfbml: true});
FB.Event.subscribe('{% if current_user %}auth.logout{% else %}auth.login{% endif %}', function(response) {
window.location.reload();
});
};
Do I need to also call FB.login?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这有效:
您可以将 6 个扩展权限参数传递给登录按钮:http://developers.facebook。 com/docs/authentication/permissions/
This works:
There are 6 extended permissions params you can pass to the login button: http://developers.facebook.com/docs/authentication/permissions/