Is there any way to post a Facebook application invite from Ruby on Rails, e.g. by deploying Koala?
Looks to be impossible at the glance. Any workarounds other than simply posting to a wall?
Actually mikeonrails
gave a correct link - the Requests dialog is the way to invite friends to your app and send them other types of requests. It does require user interaction though (just as the video shows), for requests sent to users who don't have the application installed.
And now for the details. There are 2 types of requests that you can send:
The code for user-generated requests is like this (using the Javascript SDK):
// this will show the pop-up dialog with a friend selector
// add a `to: 'friend_id1,friend_id2` to skip the friend selector
FB.ui({
method: 'apprequests',
message: 'My Great Request'
}, requestCallback);
For the app-generated requests you can use Koala like this:
user = Koala::Facebook::API.new(user_token)
user.put_object("user_with_app_installed_id", "apprequests", {:message => "Would you like to be friends?")
So, the conclusion is that you cannot invite a user's friends to your application without his approval, but you can make it really simple for him to do it (2 clicks).
If you'd like to read more:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With