Question

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';

?>
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top