尝试在 codeigniter 中使用 Twitter 进行身份验证。它去推特并回来但给出错误。这是错误和代码。任何提示?
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$request
Filename: libraries/tweet.php
Line Number: 205
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$error
Filename: libraries/tweet.php
Line Number: 205
bool(false)
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: friendship
Filename: controllers/tweet_connect.php
Line Number: 63
这是代码;
function index()
{
echo 'hi there';
}
function auth()
{
$tokens = $this->tweet->get_tokens();
// $user = $this->tweet->call('get', 'account/verify_credentiaaaaaaaaals');
//
// Will throw an error with a stacktrace.
$user = $this->tweet->call('get', 'account/verify_credentials');
var_dump($user);
//$friendship = $this->tweet->call('get', 'friendships/show', array('source_screen_name' => $user->screen_name, 'target_screen_name' => 'elliothaughin'));
//var_dump($friendship);
if ( $friendship->relationship->target->following === FALSE )
{
//$this->tweet->call('post', 'friendships/create', array('screen_name' => $user->screen_name, 'follow' => TRUE));
}
//$this->tweet->call('post', 'statuses/update', array('status' => 'Testing #CodeIgniter Twitter library by @elliothaughin - http://bit.ly/grHmua'));
$options = array(
'count' => 10,
'page' => 2,
'include_entities' => 1
);
//$timeline = $this->tweet->call('get', 'statuses/home_timeline');
//var_dump($timeline);
}