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);
}