开发者

cannot create wall posts with fb_graph

i am attempting to create a test user, and then write on that user's wall. here is my code followed by the error i get (i'm using ruby and th开发者_JS百科e 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 should give me the proper permissions to write to the wall, but as you can see, it doesn't.

any suggestions?

thanks for any help.


Are you sure your access token is valid? Facebook needs a valid access token or it will not allow you to use the user's permissions, even if he granted them to you on facebook.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜