Home
Login Button
Custom Login Button
Permissions
Request Dialog
Invite Friends
Stream Publish
Like Button
Send Button
Like Box
Comment Box
Bookmark Button
Recommendations
Data Access
Logout Button

Facebook Invite Friends

Facebook Invite control is used to invite friends to use Facebook application or Facebook Connect website by sending an invite requests. There are 2 types of invite control: classic and condensed. Following examples demonstrate each of these 2 types and PHP code for configuring them. If there are no friends on displayed controls, please login on Facebook with login button located on top right corner.

For all details about the controls, with descriptions of all optional properties, please visit Facebook Invite Friends Tutorial.


Facebook session is not established. Please login by pressing login button:


Invite Friends Classic



// create instance of login control
$invite1 = new InviteFriends();

// set main title of the control
$invite1->SetMainTitle("Main title");

// set content inside invite request
$invite1->SetContent(This is content of invite request.");

// render the command
$invite1->Render();



Invite Friends Condensed



// create instance of login control
$invite2 = new InviteFriendsCondensed();

// set URL where app will be redirected after invitations are sent
$invite2->SetActionUrl("http://localhost:81/");

// set content inside invite request
$invite2->SetContent("This is content of invite request.");

// render the command
$invite2->Render();