开发者

Twitter OAuth 500 internal server error

开发者 https://www.devze.com 2023-03-07 04:54 出处:网络
This simple code doesnt work... can anyone help me find the problem... it gives me 500 internal server error

This simple code doesnt work... can anyone help me find the problem... it gives me 500 internal server error

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>


is there an error control in EpiTwitter class?

try this:

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

精彩评论

暂无评论...
验证码 换一张
取 消