コード例 #1
1
ファイル: facebook.php プロジェクト: robdmat/sport.net
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  *
  * @see BaseFacebook::__construct
  */
 public function __construct($config)
 {
     if (function_exists('session_status') && session_status() !== PHP_SESSION_ACTIVE || !session_id()) {
         session_start();
     }
     $_REQUEST += $_GET;
     if ($config == null) {
         $this->_ci =& get_instance();
         $this->_ci->load->config('facebook');
         $config = array('appId' => $this->_ci->config->item('appId'), 'secret' => $this->_ci->config->item('secret'));
     }
     if (!isset($config['appId']) || !isset($config['secret'])) {
         $this->_ci =& get_instance();
         $this->_ci->load->config('facebook');
         //            $config['appId'] = $this->_ci->config->item('appId');
         //            $config['secret'] = $this->_ci->config->item('secret');
         $config['appId'] = '446400522196773';
         $config['secret'] = '0bc289d56447f3ca090be62f4e593fde';
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
         // re-load the persisted state, since parent
         // attempted to read out of non-shared cookie
         $state = $this->getPersistentData('state');
         if (!empty($state)) {
             $this->state = $state;
         } else {
             $this->state = null;
         }
     }
 }
コード例 #2
0
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration.
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     if (!session_id()) {
         session_start();
     }
     parent::__construct($config);
 }
コード例 #3
0
ファイル: Facebook.php プロジェクト: emgiezet/faceboo
 /**
  * Constructor
  */
 public function __construct(array $parameters = array(), Session $session, $logger = null)
 {
     $this->session = $session;
     $this->logger = $logger;
     $this->parameters = array_merge($this->getDefaultParameters(), $parameters);
     if (!$this->hasParameter('app_id')) {
         throw new \Exception('You need to set the "app_id" parameter');
     }
     if (!$this->hasParameter('secret')) {
         throw new \Exception('You need to set the "secret" parameter');
     }
     if ($this->hasParameter('timeout')) {
         self::$CURL_OPTS[CURLOPT_TIMEOUT] = $this->getParameter('timeout');
     }
     if ($this->hasParameter('connect_timeout')) {
         self::$CURL_OPTS[CURLOPT_CONNECTTIMEOUT] = $this->getParameter('connect_timeout');
     }
     if ($this->hasParameter('proxy')) {
         self::$CURL_OPTS[CURLOPT_PROXY] = $this->getParameter('proxy');
     }
     $baseParameters = array('appId' => isset($this->parameters['app_id']) ? $this->parameters['app_id'] : null, 'secret' => isset($this->parameters['secret']) ? $this->parameters['secret'] : null);
     $this->session->start();
     //we want to avoir the session_start in parent::__construct()
     \BaseFacebook::__construct($baseParameters);
 }
コード例 #4
0
ファイル: facebook.php プロジェクト: prabudiss/knovid_v2
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration.
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     parent::__construct($config);
     if (!isset($_SESSION)) {
         session_start();
     }
 }
コード例 #5
0
 /**
  * @param array $config the application configuration.
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config, Session $session, $prefix = self::PREFIX)
 {
     $this->session = $session;
     $this->prefix = $prefix;
     $this->session->start();
     parent::__construct($config);
 }
コード例 #6
0
ファイル: facebook.php プロジェクト: dgw/ThinkUp
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration.
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     if (!session_id()) {
         SessionCache::init();
     }
     parent::__construct($config);
 }
コード例 #7
0
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #8
0
ファイル: facebook.php プロジェクト: nbcutech/o3drupal
  /**
   * Identical to the parent constructor, except that
   * we start a PHP session to store the user ID and
   * access token if during the course of execution
   * we discover them.
   *
   * @param Array $config the application configuration.
   * @see BaseFacebook::__construct in facebook.php
   */
  public function __construct($config) {
    parent::__construct($config);
    if (!isset($_SESSION)) {
		session_name('TGP_Homework');
		session_set_cookie_params(31556926);
		session_start();
    }
  }
コード例 #9
0
ファイル: Facebook.php プロジェクト: tractorcow/simplesamlphp
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in base_facebook.php
  */
 public function __construct(array $config, &$ssp_state)
 {
     $this->ssp_state =& $ssp_state;
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #10
0
ファイル: Facebook.php プロジェクト: NaszvadiG/ImageCMS
 public function __construct($config, $logCallback = null)
 {
     if (is_callable($logCallback)) {
         $this->logCallback = $logCallback;
     }
     parent::__construct($config);
     // TODO: Change the autogenerated stub
 }
コード例 #11
0
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     //    if (!session_id()) {if (!isset($_SESSION)) {session_start();}}
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #12
0
ファイル: oxfb.php プロジェクト: Crease29/oxideshop_ce
 /**
  * Sets default application parameters - FB application ID,
  * secure key and cookie support.
  *
  * @return null
  */
 public function __construct()
 {
     $oConfig = oxRegistry::getConfig();
     $aFbConfig["appId"] = $oConfig->getConfigParam("sFbAppId");
     $aFbConfig["secret"] = $oConfig->getConfigParam("sFbSecretKey");
     $aFbConfig["cookie"] = true;
     BaseFacebook::__construct($aFbConfig);
 }
コード例 #13
0
ファイル: Facebook.php プロジェクト: hongtien510/appsdaugia
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration.
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     if (!session_id()) {
         //  		session_start();
         //need this for Zend Framework
         Zend_Session::start();
     }
     parent::__construct($config);
 }
コード例 #14
0
ファイル: Facebook.php プロジェクト: anjaneyareddy/oet
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration.
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     if (!session_id()) {
         session_start();
     }
     $config['appId'] = '416398375038503';
     $config['secret'] = 'f707a5d557ddb60205a5b8f535e56bac';
     parent::__construct($config);
 }
コード例 #15
0
 /**
  * @param Request                      $request
  * @param FacebookPersistenceInterface $persistence
  * @param array                        $config
  */
 public function __construct(Request $request, FacebookPersistenceInterface $persistence = null, $config)
 {
     $this->setAppId($config['appId']);
     if ($persistence) {
         $this->persistence = $persistence;
         $this->persistence->init($this);
     }
     parent::__construct($request, $config);
 }
コード例 #16
0
ファイル: Facebook.php プロジェクト: natxet/operacore
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array              $config the application configuration.
  * @param \OperaCore\Session Session object
  *
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     if (isset($config['session_container'])) {
         $this->session = $config['session_container'];
     } else {
         $this->session =& $_SESSION;
     }
     parent::__construct($config);
 }
コード例 #17
0
ファイル: facebook.php プロジェクト: hotanlam/japansource
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     if (!session_id()) {
         CakeSession::start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #18
0
ファイル: Facebook_oauth.php プロジェクト: kissthink/ym_oauth
 public function __construct($config)
 {
     if (!session_id()) {
         session_start();
     }
     $this->client_id = $config['appId'];
     $this->client_secret = $config['secret'];
     $this->callback_url = $config['callback_url'];
     parent::__construct($config);
 }
コード例 #19
0
ファイル: facebook.php プロジェクト: nitishdola/99fest
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     /*   if (!session_id()) {
     		session_start();
          }*/
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #20
0
ファイル: facebook.php プロジェクト: sikeze/local_facebook
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config, $fromcron = false)
 {
     if (!session_id() && !$fromcron) {
         session_start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #21
0
ファイル: facebook.php プロジェクト: andrewkrug/repucaution
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     if (!session_id()) {
         session_save_path(realpath(APPPATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'sessions'));
         session_start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #22
0
ファイル: Core.php プロジェクト: ebussola/facebook-core
 public function __construct($app_id, $secret, $redirect_uri, AccessTokenData $access_token_data, $scope = 'ads_management', $guzzle_client = null)
 {
     $this->scope = $scope;
     $this->redirect_uri = rtrim($redirect_uri, '/') . '/';
     $this->access_token_data = $access_token_data;
     if ($guzzle_client === null) {
         $guzzle_client = new Client();
     }
     $this->guzzle_client = $guzzle_client;
     parent::__construct(array('appId' => $app_id, 'secret' => $secret));
 }
コード例 #23
0
 public function __construct($di)
 {
     $this->di = $di;
     $fbConfig = $di->get('config')->pup->connectors->facebook;
     $config['appId'] = $fbConfig->appId;
     $config['secret'] = $fbConfig->secret;
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #24
0
ファイル: facebook.php プロジェクト: flyeven/Meet-Univ
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration.
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config = array())
 {
     if (!session_id()) {
         session_start();
     }
     if (count($config) == 0) {
         //$config=array('appId'=>'415316545179174','secret'=>'ac58e50d8d10b458388e63eec36939ae');
         $config = array('appId' => '332345880170760', 'secret' => '29a0f2cd00dcfbab6143d0566b0218d1');
     }
     parent::__construct($config);
 }
コード例 #25
0
ファイル: facebook.php プロジェクト: mydos/JBIMS-Admission
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array   $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     if (!session_id()) {
         if (!isset($_SESSION)) {
             $some_name = session_name("JBIMSAdmission");
             session_start();
         }
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #26
0
ファイル: facebook.php プロジェクト: raphaelportland/xiajob2
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct()
 {
     $CI =& get_instance();
     $config['appId'] = $CI->config->item('facebook_appId');
     $config['secret'] = $CI->config->item('facebook_secret');
     $config['fileUpload'] = $CI->config->item('facebook_fileUpload');
     // optional
     $this->config = $config;
     if (!session_id()) {
         session_start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
コード例 #27
0
ファイル: facebook.php プロジェクト: profinder/profinder
 public function __construct($config)
 {
     if (function_exists('session_status') && session_status() !== PHP_SESSION_ACTIVE || !session_id()) {
         session_start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
         $state = $this->getPersistentData('state');
         if (!empty($state)) {
             $this->state = $state;
         } else {
             $this->state = null;
         }
     }
 }
コード例 #28
0
ファイル: facebook.php プロジェクト: tuanlibra/thptxuanang
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  *
  * @see BaseFacebook::__construct
  */
 public function __construct($config)
 {
     if (function_exists('session_status') && session_status() !== PHP_SESSION_ACTIVE || !session_id()) {
         //session_start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
         // re-load the persisted state, since parent
         // attempted to read out of non-shared cookie
         $state = $this->getPersistentData('state');
         if (!empty($state)) {
             $this->state = $state;
         } else {
             $this->state = null;
         }
     }
 }
コード例 #29
0
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  *
  * @see BaseFacebook::__construct
  */
 public function __construct($config)
 {
     if (!session_id()) {
         CakeSession::start();
         //User CakePHP's session to replace original session_start()
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
         // re-load the persisted state, since parent
         // attempted to read out of non-shared cookie
         $state = $this->getPersistentData('state');
         if (!empty($state)) {
             $this->state = $state;
         } else {
             $this->state = null;
         }
     }
 }
コード例 #30
0
 /**
  * Identical to the parent constructor, except that
  * we start a PHP session to store the user ID and
  * access token if during the course of execution
  * we discover them.
  *
  * @param Array $config the application configuration. Additionally
  * accepts "sharedSession" as a boolean to turn on a secondary
  * cookie for environments with a shared session (that is, your app
  * shares the domain with other apps).
  * @see BaseFacebook::__construct in facebook.php
  */
 public function __construct($config)
 {
     // Placing this here to prevent weird warnings
     ob_start();
     if (!session_id()) {
         session_start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
         // re-load the persisted state, since parent
         // attempted to read out of non-shared cookie
         $state = $this->getPersistentData('state');
         if (!empty($state)) {
             $this->state = $state;
         } else {
             $this->state = null;
         }
     }
 }