Twitter Api Problem?
I'm using the EpiTwitter getAuthorizeUrl() for Twitter authorization.
the code :
<?php
include 'EpiCurl.php';
include 'EpiOAuth.php';
include 'EpiTwitter.php';
require_once 'secret.php';
$Twitter = new EpiTwitter($consumer_key, $consumer_secret);
$url = $Twitter->getAuthorizationUrl();
echo '<a href="' .$url. '">Authorize with Twitter</a>';
?>
i keep getting this error
"Woah there开发者_高级运维!
This page is no longer valid. It looks like someone already used the token information you provided. Please return to the site that sent you to this page and try again … it was probably an honest mistake."
The url looks fine, but just doesn't work.
http://twitter.com/oauth/authorize?oauth_token=
im sure the ?oauth_token= must have a value, but its not being generated!! thanks for the help secrets.php
<?php
$consumer_key ='xxx';
$consumer_secret ='xxx';
?>
Check out your consumer key and secret once again. Maybe you've typed your variable names wrong. If you used the sample code from here straight out of the box, then the variables are $consumer_key
and $consumer_secret
- lowercase and underscorized, unlike yours.
精彩评论