Skip to content

Instantly share code, notes, and snippets.

@SecureCloud-biz
Created July 12, 2014 23:37
Show Gist options
  • Save SecureCloud-biz/693924990ba41f908d2d to your computer and use it in GitHub Desktop.
Save SecureCloud-biz/693924990ba41f908d2d to your computer and use it in GitHub Desktop.
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>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment