当前位置: 首页>>代码示例>>PHP>>正文


PHP TwitterOAuth::__construct方法代码示例

本文整理汇总了PHP中TwitterOAuth::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP TwitterOAuth::__construct方法的具体用法?PHP TwitterOAuth::__construct怎么用?PHP TwitterOAuth::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TwitterOAuth的用法示例。


在下文中一共展示了TwitterOAuth::__construct方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($key, $secret, $callback)
 {
     $this->oauth_appId = $key;
     $this->oauth_appSecret = $secret;
     parent::__construct($key, $secret);
     $this->callback = $callback;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:7,代码来源:consumer.php

示例2: __construct

 public function __construct($options)
 {
     $consumer_key = $options['consumer_key'];
     $consumer_secret = $options['consumer_secret'];
     $oauth_token = $options['oauth_token'];
     $oauth_token_secret = $options['oauth_token_secret'];
     parent::__construct($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret);
     $this->cacheFile = get_stylesheet_directory() . '/core/twitter/twcache.tmp';
 }
开发者ID:ben-sav,项目名称:benwpstart,代码行数:9,代码来源:CoreTwitter.php

示例3: __construct

 public function __construct()
 {
     $this->consumerKey = \OpenFuego\TWITTER_CONSUMER_KEY;
     $this->consumerSecret = \OpenFuego\TWITTER_CONSUMER_SECRET;
     $this->accessToken = \OpenFuego\TWITTER_OAUTH_TOKEN;
     $this->accessTokenSecret = \OpenFuego\TWITTER_OAUTH_SECRET;
     try {
         parent::__construct($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessTokenSecret);
     } catch (\PDOException $e) {
         Logger::error($e);
     }
 }
开发者ID:BBGInnovate,项目名称:bbgWPFuego,代码行数:12,代码来源:TwitterHandle.class.php

示例4: __construct

 public function __construct($oauth_token = NULL, $oauth_token_secret = NULL)
 {
     // Set the Consumer Key
     $key = Config::get('social.twitter.app_id');
     // Set the Consumer Secret
     $secret = Config::get('social.twitter.app_secret');
     $oauth_token = Config::get('social.twitter.access_token');
     $oauth_token_secret = Config::get('social.twitter.access_token_secret');
     // Log::info('app key '.$key);
     // Log::info('app secret '.$secret);
     // Log::info('client token '.$oauth_token);
     // Log::info('client token secret '.$oauth_token_secret);
     parent::__construct($key, $secret, $oauth_token, $oauth_token_secret);
 }
开发者ID:jiqiang90,项目名称:laravel-restful-api-starter,代码行数:14,代码来源:TwitterWrapper.php

示例5: Twconnect

 /**
  * 1. Twconnect class constructor, // not yet - checks login and puts user information in $this->user array
  */
 public function Twconnect()
 {
     $ci =& get_instance();
     $ci->config->load('twitter', true);
     $config = $ci->config->item('twitter');
     /* Try to retrieve user access token (permanent) from session */
     $access_token = $ci->session->userdata('tw_access_token');
     if ($access_token && isset($access_token['oauth_token']) && isset($access_token['oauth_token_secret'])) {
         // echo 'Create a TwitterOauth object with consumer(app) and user tokens.';
         // echo 'It is the last (third) step of Twitter OAuth process';
         parent::__construct($config['consumer_key'], $config['consumer_secret'], $access_token['oauth_token'], $access_token['oauth_token_secret']);
         $this->tw_access_token = $access_token;
         $this->tw_user_id = isset($access_token['user_id']) ? $access_token['user_id'] : null;
         $this->tw_user_name = isset($access_token['screen_name']) ? $access_token['screen_name'] : null;
         /* Try to retrieve request token (temporary) from session */
     } else {
         $request_token = $ci->session->userdata('tw_request_token');
         if ($request_token && isset($request_token['oauth_token']) && isset($request_token['oauth_token_secret'])) {
             // echo 'Create object with request token key/secret sent previously to twitter';
             // echo 'It is the second step of Twitter OAuth process';
             parent::__construct($config['consumer_key'], $config['consumer_secret'], $request_token['oauth_token'], $request_token['oauth_token_secret']);
             $this->tw_request_token = $request_token;
         } else {
             // echo 'Create object without access or request token';
             // echo 'It is the first step of Twitter OAuth process';
             parent::__construct($config['consumer_key'], $config['consumer_secret']);
         }
     }
     $this->tw_config = $config;
     $this->tw_status = $ci->session->userdata('tw_status');
     $this->host = 'https://api.twitter.com/1.1/';
     // Use API v1.1
 }
开发者ID:BersnardC,项目名称:DROPINN,代码行数:36,代码来源:twconnect.php

示例6:

 function __construct($apipath, $consumer_key, $consumer_secret, $oauth_token = NULL, $oauth_token_secret = NULL)
 {
     parent::__construct($consumer_key, $consumer_secret, $oauth_token, $oauth_token_secret);
     $this->host = $apipath;
 }
开发者ID:phellmes,项目名称:hubzilla-addons,代码行数:5,代码来源:statusnet.php

示例7: __construct

 public function __construct($oauth_token = null, $oauth_token_secret = null)
 {
     $this->_key = config('services.twitter.key');
     $this->_secret = config('services.twitter.secret');
     parent::__construct($this->_key, $this->_secret, $oauth_token, $oauth_token_secret);
 }
开发者ID:nabble,项目名称:ajde,代码行数:6,代码来源:Twitter.php

示例8: rdconnection

 public function rdconnection($o_token = "", $o_token_secret = "")
 {
     $appkey = $this->_ci->config->item('twitter_key');
     $appsecret = $this->_ci->config->item('twitter_secret');
     return parent::__construct($appkey, $appsecret, $o_token, $o_token_secret);
 }
开发者ID:azanium,项目名称:Klumbi-Web,代码行数:6,代码来源:Rapp_tw_rido.php


注:本文中的TwitterOAuth::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。