コード例 #1
0
ファイル: CLIApp.php プロジェクト: Geekathon/Selective-Tweets
 /**
  * Let's get started
  */
 protected function init()
 {
     // security - ensure we only run these scripts under CLI
     $this->requireCLI();
     parent::init();
     $this->fb = FacebookSession::newAppSession();
     try {
         $this->fb->validate();
     } catch (FacebookRequestException $ex) {
         // Session not valid, Graph API returned an exception with the reason.
         error_log($ex->getMessage());
     } catch (\Exception $ex) {
         // Graph API returned info, but it may mismatch the current app or have expired.
         error_log($ex->getMessage());
     }
 }
コード例 #2
0
ファイル: WebApp.php プロジェクト: Geekathon/Selective-Tweets
 protected function init()
 {
     session_start();
     parent::init();
     $this->initFacebookSession();
 }