emeraldhieu
emeraldhieu

Reputation: 9439

Invite Facebook friends into my app

I'm writing an entertainment application (a RESTful application written in Android). I'd like to show Facebook friends and invite them into my app. Now I loaded FB friends successfully. What will I do the next? Please give me an idea.

(I guess I should send an invitation email for them. Is it right?)

Upvotes: 6

Views: 9415

Answers (3)

Roopchand
Roopchand

Reputation: 2718

invite facebook friend from your application or website,use this small lines of code and send invitation to all facebook friends to visit your website.i also used this script its working nicely. your domain must be ssl certified because facebook didn't allowing unsecured domains.

<script src="http://connect.facebook.net/en_US/all.js"></script>

<script>
FB.init({
appId:'APP_ID',
cookie:true,
status:true,
xfbml:true
});

function FacebookInviteFriends()
{
FB.ui({
method: 'apprequests',
message: 'Your Message diaolog'
});
}
</script>


//HTML Code
<div id="fb-root"></div>
<a href='#' onclick="FacebookInviteFriends();"> 
Facebook Invite Friends Link
</a>

add this below code to your website main page..

<script type='text/javascript'>
if (top.location!= self.location)
{
top.location = self.location
}
</script>

for more detail you can check:- http://www.9lessons.info/2012/07/facebook-invite-friends-api.html

Upvotes: -1

user1417127
user1417127

Reputation: 1645

My ideas:

  • Call Facebook API to post your app's download link to your friends's wall.
  • Send an SMS or email if you have those infomations.
  • Create an app on Facebook. Then send an app request to your friends. Your friends will receive notification on Facebook. (I am currently using this to invite friend to my app)

Upvotes: 3

QVDev
QVDev

Reputation: 1093

Please take a look into the following documentation: https://developers.facebook.com/docs/mobile/android/build/

And look for Request Dialog see https://developers.facebook.com/docs/reference/dialogs/requests/

Those will make you're life easy you just have to select friends!

Upvotes: 4

Related Questions