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 Extended Permissions

Permission control is used to allow the user to add extended permissions, like sending upload images and status updates, to Facebook application. It is possible to define JavaScript code which will be executed and form id which will be submitted after permissions are confirmed by user. This example shows PHP code used for adding 2 permissions (sending an email and getting user activities).

For all details about the control, with descriptions of all optional properties, please visit Facebook Extended Permissions Tutorial.


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



// create new instance of Permssions control
$perms = new Permissions();

// set permissions on email and SMS
$perms->SetPermissions("email, sms");

// Optional: set CSS class for add permissions button
$perms->SetCssClass("facebookbutton");

// Optional: set JavaScript code for confirmation
$perms->SetOnConfirmJavaScript("alert('permissions added')");

// Optional: set submit form id for confirmation
$perms->SetOnConfirmSubmitForm("form1");

// render the control on the page
$perms->Render();