daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Jan 21st, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private function getFacebookAccess(&$facebook){
  2.         $facebook = new \Facebook(array(
  3.                 'appId' => self::APP_ID,
  4.                 'secret' => self::SECRET
  5.             ));
  6.  
  7.         //var_dump($facebook);
  8.         $fcbkUser = $facebook->getUser();
  9.  
  10.         //var_dump($fcbkUser);
  11.         if ( ! $fcbkUser ) {
  12.             $error_msg = "We have problems trying to connect with Facebook, try it later on!";
  13.             //echo $error_msg;
  14.             $this->get('session')->getFlashBag()->add('error', $error_msg);
  15.             return false;
  16.         }else{
  17.             return true;
  18.         }
  19.  
  20.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top