我正在尝试创建一个测试用户,然后在该用户的墙上写字。这是我的代码,后面是我得到的错误(我正在使用 ruby 和 gem fb_graph):
app = FbGraph::Application.new(config[:client_id], :secret =>
config[:client_secret])
user1 = app.test_user!(:installed => true, :permissions
=> :publish_stream)
user2 = app.test_user!(:installed => true, :permissions
=> :publish_stream)
me = FbGraph::User.me(ACCESS_TOKEN)
me.feed!(:message => "Testing")
FbGraph::Unauthorized: FbGraph::Unauthorized from /Library/Ruby/Gems/
1.8/gems/fb_graph-1.9.4/lib/fb_graph/node.rb:126:in
'handle_httpclient_error'
from /Library/Ruby/Gems/1.8/gems/fb_graph-1.9.4/lib/fb_graph/node.rb:
115:in 'handle_response'
from /Library/Ruby/Gems/1.8/gems/fb_graph-1.9.4/lib/fb_graph/node.rb:
48:in 'post'
from /Library/Ruby/Gems/1.8/gems/fb_graph-1.9.4/lib/fb_graph/
connections/feed.rb:15:in `feed!'
from (irb):90
publish_stream 应该给我适当的权限来写到墙上,但正如你所看到的,它没有。
有什么建议么?
谢谢你的帮助。