Twitter OAuth 500内部服务器错误

时间:2011-05-21 03:40:08

标签: php twitter twitter-oauth

这个简单的代码不起作用......任何人都可以帮我找到问题...它给了我500个内部服务器错误

include "../twitter-async/EpiCurl.php";
include "../twitter-async/EpiOAuth.php";
include "../twitter-async/EpiTwitter.php";
define("TWITTER_CONSUMER_KEY","my_key");
define("TWITTER_CONSUMER_SECRET","my_secret");
function init($oauth_token = null, $oauth_token_secret = null)
{
        return new EpiTwitter(TWITTER_CONSUMER_KEY,TWITTER_CONSUMER_SECRET,$oauth_token,$oauth_token_secret);
}

$twitter = init();

if($twitter)
{
    echo "success";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
</body>
</html>

1 个答案:

答案 0 :(得分:1)

EpiTwitter类中是否有错误控制?

试试这个:

<?php
  ini_set("display_errors", "1");
  error_reporting(E_ALL);
  echo (init()) ? "success" : "error";
?>