我尝试使用 Epi twitter 进行登录,这是代码
$consumerKey = $this->consumerKey ;
$consumerSecret = $this->consumerSecret;
include 'application/libraries/twitter-oauth/EpiCurl.php';
include 'application/libraries/twitter-oauth/EpiOAuth.php';
include 'application/libraries/twitter-oauth/EpiTwitter.php';
error_reporting(E_ALL);
$Twitter = new EpiTwitter($consumerKey, $consumerSecret);
if(isset($_GET['oauth_token']) || (isset($_COOKIE['oauth_token']) && isset($_COOKIE['oauth_token_secret'])))
{
// process
}
elseif(isset($_GET['denied']))
{
// user denied access
echo 'You must sign in through twitter first';
exit;
}
else
{
// user not logged in
echo 'You are not logged in';
exit;
}
但总是响应是“你没有登录 ini”,尽管我已经在其他页面上登录了 twitter。我的代码有问题吗?
感谢任何帮助。
问候