我已经有一个Facebook应用程序,用户已经在使用它。我已经有了通过考拉贴在墙上的功能。使用考拉从应用程序发布到用户的页面墙上
@oauth = Koala::Facebook::OAuth.new options[:fb_application_id], options[:fb_secret_key]
@graph = Koala::Facebook::API.new @oauth.get_app_access_token
@graph.put_connections(fb_user_id, "feed", :message => 'sample message')
现在我想添加一个功能,其中我可以获取用户的页面ID并允许我的应用发布到该页面。
类似下面:
@oauth = Koala::Facebook::OAuth.new options[:fb_application_id], options[:fb_secret_key]
@graph = Koala::Facebook::API.new @oauth.get_app_access_token
@graph.put_connections 'the_page_id', 'feed', :message => 'this is a message to post'
线的上面的结果是:
Koala::Facebook::ClientError: type: OAuthException, code: 200, message: (#200) The user hasn't authorized the application to perform this action [HTTP 403]
我已经在应用程序侧设置权限“manage_pages publish_actions publish_stream”,并且当用户授权应用程序。
请帮忙。
谢谢!
我有同样的确切情况和收到相同的错误。你有没有设法解决这个问题? – 2015-03-12 22:15:56
设法通过更新范围来解决这个问题'''manage_pages publish_pages publish_actions''' – koyz 2015-07-27 09:09:15