• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BaseFacebook类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中BaseFacebook的典型用法代码示例。如果您正苦于以下问题:PHP BaseFacebook类的具体用法?PHP BaseFacebook怎么用?PHP BaseFacebook使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了BaseFacebook类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: __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()) {
         CakeSession::start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
开发者ID:hotanlam,项目名称:japansource,代码行数:22,代码来源:facebook.php


示例16: __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_save_path(realpath(APPPATH . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR . 'sessions'));
         session_start();
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
开发者ID:andrewkrug,项目名称:repucaution,代码行数:23,代码来源:facebook.php


示例17: __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 = 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);
 }
开发者ID:flyeven,项目名称:Meet-Univ,代码行数:20,代码来源:facebook.php


示例18: __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()) {
         if (!isset($_SESSION)) {
             $some_name = session_name("JBIMSAdmission");
             session_start();
         }
     }
     parent::__construct($config);
     if (!empty($config['sharedSession'])) {
         $this->initSharedSession();
     }
 }
开发者ID:mydos,项目名称:JBIMS-Admission,代码行数:25,代码来源:facebook.php


示例19: __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()
 {
     $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();
     }
 }
开发者ID:raphaelportland,项目名称:xiajob2,代码行数:28,代码来源:facebook.php


示例20: 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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BaseForm类代码示例发布时间:2022-05-23
下一篇:
PHP BaseException类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap