-
-
Save SecureCloud-biz/83040663d7b023d4072b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$appId = 'aaaaaaaaaaaa'; | |
$appSecret = 'bbbbbbbbbbbb'; | |
// init facebook | |
$facebook = new Facebook( array( 'appId' => $appId, 'secret' => $appSecret ) ); | |
// get user_id, 0 if not logged in | |
$user = $facebook->getUser(); | |
// check if user is logged in | |
if ( $user ) { | |
// get long-lived access token | |
$facebook->setExtendedAccessToken(); | |
$access_token = $facebook->getAccessToken(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment