Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Fatal error when changing callback url #135

Open
Djinner opened this issue Dec 19, 2011 · 9 comments
Open

Fatal error when changing callback url #135

Djinner opened this issue Dec 19, 2011 · 9 comments

Comments

@Djinner
Copy link

Djinner commented Dec 19, 2011

Hi,

This error appears when I want to specify my callback url during a twitter authentication process :

Fatal error: Uncaught exception 'EpiOAuthUnauthorizedException' in /home/bt/public_html/chatons/4dm1n/lib/twitter/EpiOAuth.php:432 Stack trace: #0 /home/bt/public_html/chatons/4dm1n/lib/twitter/EpiOAuth.php(404): EpiOAuthException::raise(Object(EpiCurlManager), false) #1 /home/bt/public_html/chatons/4dm1n/lib/twitter/EpiOAuth.php(45): EpiOAuthResponse->__get('oauth_token') #2 /home/bt/public_html/chatons/signin.php(18): EpiOAuth->getAuthenticateUrl(NULL, Array) #3 /home/bt/public_html/chatons/index.php(24): require('/home/bt/public...') #4 {main} thrown in /home/bt/public_html/chatons/4dm1n/lib/twitter/EpiOAuth.php on line 432

I have followed your instructions at this url http://www.jaisenmathai.com/articles/twitter-async-documentation.html#oauthcallback, and I have commented the lines 171 & 172 from Epi0Auth.php file.

There is my code :

$Twitter = new EpiTwitter($consumerKey, $consumerSecret);
$customCallback = 'http://www.mydomain.com/index.php?myid'.$photoId;
echo 'sign in with twitter';

Do you have any idea to enlight me on this issue ?

By the way, thank's you very mutch for your API !

@Djinner
Copy link
Author

Djinner commented Dec 19, 2011

I forgot one line in my precedent post, there is the good one :

$Twitter = new EpiTwitter($consumerKey, $consumerSecret);
$customCallback = 'http://www.mydomain.com/index.php?myid'.$photoId;
$customUrl = $Twitter->getAuthenticateUrl(null,array('oauth_callback' => $customCallback));

echo ' sign in with twitter';

with href="'.$customUrl.'"

@jmathai
Copy link
Owner

jmathai commented Dec 19, 2011

Does simpleTest.php work?

@dhenriquez
Copy link

I have the same Fatal Error

Fatal error: Uncaught exception 'EpiOAuthUnauthorizedException' in /home/dhenriquez/dev.dhenriquez.com/nav2011/EpiOAuth.php:432 Stack trace: #0 /home/dhenriquez/dev.dhenriquez.com/nav2011/EpiOAuth.php(404): EpiOAuthException::raise(Object(EpiCurlManager), false) #1 /home/dhenriquez/dev.dhenriquez.com/nav2011/EpiOAuth.php(45): EpiOAuthResponse->__get('oauth_token') #2 /home/dhenriquez/dev.dhenriquez.com/nav2011/index.php(9): EpiOAuth->getAuthenticateUrl(NULL, Array) #3 {main} thrown in /home/dhenriquez/dev.dhenriquez.com/nav2011/EpiOAuth.php on line 432

@jmathai
Copy link
Owner

jmathai commented Dec 28, 2011

@dhenriquez does simpleTest.php work for you?

@dhenriquez
Copy link

test.php work fine with 4 string: consumer secret and key, token and secret but, when I try sign in with a custom call back show me the previus commented error.

@jmathai
Copy link
Owner

jmathai commented Jan 2, 2012

@dhenriquez I don't remember but I believe the callback url needs to be urlencoded.

$customUrl = $Twitter->getAuthenticateUrl(null,array('oauth_callback' => urlencode($customCallback)));

Try that.

@Rpsl
Copy link

Rpsl commented Feb 7, 2012

Guys, check date on your server.

@jmathai
Copy link
Owner

jmathai commented Feb 7, 2012

@Rpsl thanks. Also, here are some common errors (including server date).

http://www.jaisenmathai.com/articles/twitter-async-documentation.html#commonerrors

@almacbe
Copy link

almacbe commented May 29, 2012

Hello,

I am sorry for reopening this, but do you find some way to solve it? I have this problem too. :P

Kind regards,

Alfonso.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants