Adding a apprequest from user

640 views Asked by At

I am trying to add an app request from a user using Koala/Omniauth

@graph = Koala::Facebook::API.new(current_user.omnitoken)
@graph.put_object("me", "apprequests", {:appid => MY_APP_ID, :to => USER_ID,  :message => "Come join me!"} )

I dont get any errors, but the request does not reach the user. Is the code correct/am i missing something?

Edit: The users I am inviting have not (yet) accepted the app, however the user that IS inviting have, is this possible to do or does it require a user-popup?

2

There are 2 answers

3
Igy On BEST ANSWER

Users can use the dialog to send user-user requests to their friends who are not app users (edit: or to app users who are not their friends)

Apps can use the API directly to send app-user requests to existing users only, not to non-users

2
Lix On

Make sure your application is not in sandbox mode or that the people you are sending invites to have the correct permissions to access your sandboxed application. ( that means administrators/developers/testers )