SecureCloud-biz
7/12/2014 - 11:37 PM

Facebook Login using PHP SDK 4.0.0 with additional permissions

Facebook Login using PHP SDK 4.0.0 with additional permissions

<?php
// include code from https://gist.github.com/niraj-shah/ab1c74ad83df172e6075
 
// generate login url with scope, each permission as element in array
$loginUrl = $helper->getLoginUrl( array( 'email', 'user_friends' ) );
 
// output login link
echo '<a href="' . $loginUrl . '">Login</a>';