Reputation: 9439
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
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
Reputation: 1645
My ideas:
Upvotes: 3
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