Take the 2-minute tour ×

Working with the Facebook API makes my ears bleed, but nonetheless I've got a specific problem here which I'm hoping someone can find a solution for. I'm using the Facebook PHP SDK to allow users of my website to link their FB account with their website account, so they can return later and log in with one click (by storing their OAuth tokens in my database). This is all working fine - what I now want is to be able to provide users with the facility to invite/recommend their friends to my site, using a form on my site.

I've tried FBML examples from many places including here - I've managed to get an invitation form to display but try as I might, all I can get it to generate is an invitation to my application, which isn't relevant. The app exists only so that I have an OAuth ID/secret to use with the Graph API. I want to invite the user's friends to my website, or at the very least to a Facebook Page plugging my website. But seemingly including this FBML on my page will only generate application invites.

My question: is there any way to accomplish this? Can I invite the user's friends to my site (ie. to a specific URL), or invite them to my FB Page? Am I approaching this from the wrong angle?

Any advice would be much appreciated. If you'd benefit from any further info, please let me know. Many thanks,


share|improve this question
Hansmukh edited my question to replace all instances of "Facebook" with "Face-book". I've no idea why, but I don't appreciate it, so I've reverted these edits. If you can give me a legitimate reason for this change, I'll accept it. –  BigglesZX Dec 1 '10 at 9:52
add comment

3 Answers

up vote 1 down vote accepted

Right. It turns out after much tearing of hair, the example I gave was the right one. The invite generates an "Application Invite", but this is not like other app invites. When the recipient clicks "Accept" they are sent to the URL you specify (in this case, my website). The "App" then disappears from their request page - it does not appear in their profile like a normal app. So a horribly nonsensical process but a positive outcome. Phew!

share|improve this answer
add comment

It seems like sending a Facebook message is the way to go at this point (Jan 2013).


In general, applications on Facebook should use Requests when communicating in game status (its your turn), inviting people to use an application, or sending messages to multiple people.

FB.init({appId: 'YOUR_APP_ID', xfbml: true, cookie: true});

    method: 'send',
    name: 'Check out this site!',
    description: 'This is the best site ever!',
    link: 'http://www.example.com/refer',
    picture: 'http://www.example.com/image.jpg'
share|improve this answer
add comment

Why not go for this open source inviter which can get your work done quick . also if you are using a cms they might have already made the plugin for your cms. http://openinviter.com/

share|improve this answer
Does anyone have any experience using this? Not sure it's the right tool for this particular job... –  BigglesZX Dec 1 '10 at 9:49
Did anyone actually try this? looks rather amateurish but I'd like to hear more if anyone has played with it. –  Mahn Jul 19 '12 at 0:49
add comment

Your Answer


