Step 1 : you have to create a application in facebook  – https://developers.facebook.com/apps

Step 2: After creating facebook application – get your facebook app id

Step 3 :

Insert this  sdk before head tag

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

Step 4 :

Insert this javascript code in your web page


FB.init({
 appId:'your app id', cookie:true, status:true, xfbml:true
 });
function FacebookInviteFriends()
{
FB.ui({ method: 'send',name: 'Complete Web Tutorials - PHP, Mysql, Ajax, Jquery, HTML, CSS, facebook, twitter',link: 'http://w3lessons.info', description: 'your website description', picture: 'http://w3lessons.info/demo/web2.0.jpg'});
}

Step 5:
call the facebookinvitefriends function via this link:

<a href="#" onclick="FacebookInviteFriends();">Bring Your Friends</a>


0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *