我用THIS twitter librabry得到这个错误。任何人都可以告诉我哪里出错了吗?找不到类别PHP
错误
Fatal error: Class 'Abraham\TwitterOAuth\Config' not found in D:\wamp\www\Abraham\TwitterOAuth\TwitterOAuth.php on line 17
PHP
<?php
require_once("Abraham/TwitterOAuth/TwitterOAuth.php"); //Path to twitteroauth library you downloaded in step 3
//keys and tokens initialised
function getConnectionWithAccessToken($cons_key, $cons_secret, $oauth_token, $oauth_token_secret) {
$connection = new TwitterOAuth($cons_key, $cons_secret, $oauth_token, $oauth_token_secret);
return $connection;
}
$connection = getConnectionWithAccessToken($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);
$tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitteruser."&count=".$notweets);
echo json_encode($tweets);
echo $tweets; //testing remove for production
?>
你可以看看这个问题和它的答案http://stackoverflow.com/questions/27745553/php-include-doesnt-work-for-twitteroauth-php-but-when-i-copy-and-paste-its-con?rq = 1 – 2015-02-07 19:27:12
@Esteban现在错误显示为' {“错误“:[{”message“:”无法验证你“,”代码“:32}]}' – 2015-02-07 19:49:11