1. Create a link to the javascript function fb_connect_invite_friends(). You can see the implementation of this function in application.js. Note: This javascript function is not part of facebooker.
  2. A typical call might look like this:
    <%= link_to_function 'Invite your Friends!', 
       "fb_connect_invite_friends({
           type: 'Facebooker on Rails', 
           invitation_copy:'Please accept this invitation to Facebooker on Rails.', 
           request_action_text:'Invite your friends to join Facebooker on Rails'
        })" 
    %>
    
  3. That would result in a link like this:
  4. Depending on what you pass into the method will determine what text is displayed, what urls the user goes to on cancel/submission, how big the dialog is, etc.
  5. Go ahead and try clicking the link above. If you cancel it (by hitting 'Cancel', not by hitting the 'x') you'll GET this page. If you send a friend request you will POST to this page. If you send then params[:ids] is set to the list of uid's you invited.

Comments