· 8 years ago · Dec 16, 2016, 06:58 AM
1$dirName = dirname(__FILE__);
2require_once ("$dirName/php/facebook-php-sdk-v4-5.0-dev/src/Facebook/autoload.php");
3
4require_once ("$dirName/php/twitteroauth/autoload.php");
5
6function getConnectionWithAccessToken($cons_key, $cons_secret, $oauth_token, $oauth_token_secret) {
7 $connection = new TwitterOAuth($cons_key, $cons_secret, $oauth_token, $oauth_token_secret);
8 return $connection;
9}
10
11 $connection = getConnectionWithAccessToken($consumerkey, $consumersecret, $accesstoken, $accesstokensecret);
12
13 $tweets = $connection->get("https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=".$twitteruser."&count=".$notweets);
14
15 echo json_encode($tweets);
16
17Fatal error: Class 'TwitterOAuth' not found in C:wampwwwwebsitewp-contentthemestwentythirteenusers.php on line 22