Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use FacebookFacebookSession;
- use FacebookFacebookRedirectLoginHelper;
- use FacebookFacebookRequest;
- use FacebookFacebookResponse;
- use FacebookFacebookSDKException;
- use FacebookFacebookRequestException;
- use FacebookFacebookAuthorizationException;
- use FacebookGraphObject;
- use FacebookEntitiesAccessToken;
- use FacebookHttpClientsFacebookCurlHttpClient;
- use FacebookHttpClientsFacebookHttpable;
- // start session
- // init app with app id and secret
- FacebookSession::setDefaultApplication('1450546748547040','4c0b36c770bc22bdc45b40bd4c7b7229' );
- // login helper with redirect_uri
- $helper = new FacebookRedirectLoginHelper('http://www.immomix.ma/mysdk/src/begin.php' );
- try {
- $session = $helper->getSessionFromRedirect();
- } catch( FacebookRequestException $ex ) {
- // When Facebook returns an error
- } catch( Exception $ex ) {
- // When validation fails or other local issues
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement