Guest User

Untitled

a guest
Mar 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. require 'sdk/autoload.php';
  2.  
  3. use FacebookFacebookSession;
  4. use FacebookFacebookRedirectLoginHelper;
  5.  
  6. FacebookSession::setDefaultApplication('<MY APP ID IS HERE>', '<MY APP SECRET IS HERE>');
  7.  
  8. $helper = new FacebookRedirectLoginHelper('http://whispershare.co.za/dashboard');
  9. $loginUrl = $helper->getLoginUrl();
  10. try {
  11. $session = $helper->getSessionFromRedirect();
  12. } catch(FacebookRequestException $ex) {
  13. echo $ex;
  14. } catch(Exception $ex) {
  15. echo $ex;
  16. }
  17. if ($session) {
  18. echo 'yay';
  19. } else echo 'boo';
Add Comment
Please, Sign In to add comment