當前位置: 首頁>>代碼示例>>PHP>>正文


PHP BaseFacebook類代碼示例

本文整理匯總了PHP中BaseFacebook的典型用法代碼示例。如果您正苦於以下問題:PHP BaseFacebook類的具體用法?PHP BaseFacebook怎麽用?PHP BaseFacebook使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了BaseFacebook類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * 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);
 }
開發者ID:dgw,項目名稱:ThinkUp,代碼行數:16,代碼來源:facebook.php

示例2: __construct

 /**
  * 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();
     }
 }
開發者ID:m-godefroid76,項目名稱:devrestofactory,代碼行數:19,代碼來源:facebook.php

示例3: __construct

 /**
  * 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);
 }
開發者ID:VLabsInc,項目名稱:WordPressPlatforms,代碼行數:16,代碼來源:facebook.php

示例4: __construct

 /**
  * @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);
 }
開發者ID:hykz,項目名稱:Depot,代碼行數:11,代碼來源:FacebookSessionPersistence.php

示例5: __construct

 /**
  * 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);
 }
開發者ID:emgiezet,項目名稱:faceboo,代碼行數:28,代碼來源:Facebook.php

示例6: __construct

 /**
  * 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();
     }
 }
開發者ID:prabudiss,項目名稱:knovid_v2,代碼行數:16,代碼來源:facebook.php

示例7: __construct

 /**
  * 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);
 }
開發者ID:Crease29,項目名稱:oxideshop_ce,代碼行數:14,代碼來源:oxfb.php

示例8: __construct

 /**
  * 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();
     }
 }
開發者ID:tractorcow,項目名稱:simplesamlphp,代碼行數:20,代碼來源:Facebook.php

示例9: __construct

  /**
   * 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();
    }
  }
開發者ID:nbcutech,項目名稱:o3drupal,代碼行數:17,代碼來源:facebook.php

示例10: __construct

 /**
  * 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);
 }
開發者ID:natxet,項目名稱:operacore,代碼行數:20,代碼來源:Facebook.php

示例11: __construct

 /**
  * 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);
 }
開發者ID:hongtien510,項目名稱:appsdaugia,代碼行數:18,代碼來源:Facebook.php

示例12: __construct

 /**
  * 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);
 }
開發者ID:anjaneyareddy,項目名稱:oet,代碼行數:18,代碼來源:Facebook.php

示例13: __construct

 /**
  * 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();
     }
 }
開發者ID:nitishdola,項目名稱:99fest,代碼行數:22,代碼來源:facebook.php

示例14: __construct

 /**
  * 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();
     }
 }
開發者ID:sikeze,項目名稱:local_facebook,代碼行數:22,代碼來源:facebook.php

示例15: authenticate

 public function authenticate(TokenInterface $token)
 {
     if (!$this->supports($token)) {
         return null;
     }
     $user = $token->getUser();
     if ($user instanceof UserInterface) {
         $this->userChecker->checkPostAuth($user);
         $newToken = new FacebookUserToken($this->providerKey, $user, $user->getRoles());
         $newToken->setAttributes($token->getAttributes());
         return $newToken;
     }
     try {
         if ($uid = $this->facebook->getUser()) {
             $newToken = $this->createAuthenticatedToken($uid);
             $newToken->setAttributes($token->getAttributes());
             return $newToken;
         }
     } catch (AuthenticationException $failed) {
         throw $failed;
     } catch (\Exception $failed) {
         throw new AuthenticationException($failed->getMessage(), null, (int) $failed->getCode(), $failed);
     }
     throw new AuthenticationException('The Facebook user could not be retrieved from the session.');
 }
開發者ID:hykz,項目名稱:Depot,代碼行數:25,代碼來源:FacebookProvider.php


注:本文中的BaseFacebook類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。