有没有人能够通过考拉订阅页面Feed到Facebook?我可以订阅用户喜欢,朋友,供稿等和页面照片,签到。但我无法让Facebook订阅并在页面供稿上发布更新。这是我经历的 Rails控制台(回发网址已更改)
updates.subscribe("page", "feed", "http://domain.com/facebook_updates", FacebookUpdatesController::VERIFY_TOKEN)
Koala::Facebook::APIError: OAuthException: (#100) "feed" is an invalid field name
from /opt/ruby/lib/ruby/gems/1.9.1/gems/koala-1.2.1/lib/koala/graph_api.rb:217:in `block in graph_call'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/koala-1.2.1/lib/koala.rb:69:in `api'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/koala-1.2.1/lib/koala/graph_api.rb:215:in `graph_call'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/koala-1.2.1/lib/koala/realtime_updates.rb:62:in `subscribe'
from (irb):66
from /opt/ruby/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/commands/console.rb:45:in `start'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/commands/console.rb:8:in `start'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
答案 0 :(得分:0)
好的......再一次,我想我已经明白了。这是我纠正的:
您必须订阅“用户”,“Feed”才能访问Page的Feed数据。例如:
updates.subscribe(“user”,“feed”,“http://domain.com/facebook_updates”,FacebookUpdatesController :: VERIFY_TOKEN)
Omniauth必须具有接收Feed实时更新的适当权限。特别是我不得不在scope参数中添加'read_stream'。我正在使用Omniauth的设计,这是devise.rb文件的一个例子:
config.omniauth:facebook,'APP_ID','APP_SECRET',{:scope =&gt; 'publish_stream,电子邮件,offline_access,USER_LOCATION,user_likes,user_interests,read_stream,manage_pages', :client_options =&gt; {:ssl =&gt; {:ca_file =&gt; '/usr/lib/ssl/certs/ca-certificates.crt'}}}
我希望这有助于像我这样挣扎的其他人。