我浏览了facebooker的msg档案库、google等,发现了一些与此相关的信息,他们基本上说“去看看facebook的文档,看看发生了什么”。我做到了,但我仍然不清楚发生了什么,为什么我不能检索我的个人资料或状态阵列使用facebook。我开始认为facebooker的直接api调用是“断开的”,接下来将尝试等效的fql查询。
我是不是错过了facebook用户初始化之类的东西?
我查过电话的来源,我打的电话似乎正是我要找的。
我得到的错误是api_ec_info_no_information,“没有为此用户设置任何信息”。当我使用FB工具控制台检查我的个人资料时,我看到我的信息很好。
我要做的是设置一个Beanstalk作业来获取FB配置文件/状态信息,如下所示:
sess = Facebooker::Session.create("<key>", "<secret_key>")
# session_key passed to beanstalk as body payload
sess.secure_with! job.body
fbkr_user = Facebooker::User.new(sess.user.id, sess)
puts fbkr_user.get_profile_info.to_s # info not set error
# same result if I go through the session, or try to get user.statuses
puts sess.user.get_profile_info
puts sess.user.statuses
错误:
[..]/gems/facebooker-1.0.62/lib/facebooker/parser.rb:646:in `process':
No information has been set for this user (StandardError)
from /Users/notbrain/.gem/ruby/1.8/gems/facebooker-1.0.62/lib/
facebooker/parser.rb:36:in `parse'
from /Users/notbrain/.gem/ruby/1.8/gems/facebooker-1.0.62/lib/
facebooker/service.rb:66:in `post'
from /Users/notbrain/.gem/ruby/1.8/gems/facebooker-1.0.62/lib/
facebooker/session.rb:638:in `post_without_logging'
from /Users/notbrain/.gem/ruby/1.8/gems/facebooker-1.0.62/lib/
facebooker/session.rb:649:in `post'
from /Users/notbrain/.gem/ruby/1.8/gems/facebooker-1.0.62/lib/
facebooker/logging.rb:20:in `log_fb_api'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/
ruby/1.8/benchmark.rb:308:in `realtime'
from /Users/notbrain/.gem/ruby/1.8/gems/facebooker-1.0.62/lib/
facebooker/logging.rb:20:in `log_fb_api'
from /Users/notbrain/.gem/ruby/1.8/gems/facebooker-1.0.62/lib/
facebooker/session.rb:648:in `post'
from /Users/notbrain/.gem/ruby/1.8/gems/facebooker-1.0.62/lib/
facebooker/models/user.rb:390:in `get_profile_info'
from app/workers/index_fb_user.rb:23
from app/workers/index_fb_user.rb:6:in `loop'
from app/workers/index_fb_user.rb:6
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `eval'
from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/runner.rb:
46
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in
`require'
from script/runner:3