3

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?

hso
  • 345
  • 3
  • 19

2 Answers2

5

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

Igy
  • 43,710
  • 8
  • 89
  • 115
  • 1
    What's the point of sending a request to someone who is already a user? – Kevin Aug 25 '12 at 04:37
  • Why would apps be able to send requests to arbitrary users they have no relationship with? it'd be rife with spam almost immediately. App->User requests are a reengagement channel to inform users that something has changed in the app and they should come back, e.g. tournament has ended, building complete, new feature unlocked, etc – Igy Aug 25 '12 at 14:45
  • I have been researching this all day and it seems correct. It's unfortunate that you can't programmatically create user to user app requests. – Carlos Cervantes Jan 28 '13 at 01:41
0

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 )

Lix
  • 47,311
  • 12
  • 103
  • 131
  • it is not in sandbox mode, and it works to invite users if I use the javascript-popup from facebook... – hso Jan 12 '12 at 14:17
  • In that case you'll have to wait for someone to provide more insight who knows more about the SDK you are using. This **is** possible with the PHP SDK... – Lix Jan 12 '12 at 14:24