I'm trying to send apprequest on the backend, here is the code I'm trying to do it, but it always return 'Mogli::Client::HTTPException' error. My question is (1) can I do it on backend? (2) what kind of permission should I acquire ? (3) what is the correct way to use the apprequest_create?
Thank you and following is the code i'm trying to use:
friend = Mogli::User.find(friend_facebook_id.to_i, current_facebook_client)
friend.apprequests_create(
Mogli::AppRequest.new(
开发者_开发技巧 :link=>"callback url",
:to => {:id => friend_facebook_id, :name => friend_facebook_name},,
:message=>"Try 1"))
Here is the application trace:
/Library/Ruby/Gems/1.8/gems/mogli-0.0.30/lib/mogli/client.rb:215:in `raise_error_if_necessary'
/Library/Ruby/Gems/1.8/gems/mogli-0.0.30/lib/mogli/client.rb:151:in `map_data'
/Library/Ruby/Gems/1.8/gems/mogli-0.0.30/lib/mogli/client.rb:116:in `post'
/Library/Ruby/Gems/1.8/gems/mogli-0.0.30/lib/mogli/model.rb:113:in `apprequests_create'
精彩评论