Fatal error when changing callback url #135

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

Comments

Projects
None yet
5 participants
@Djinner

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

This comment has been minimized.

Show comment Hide comment
@Djinner

Djinner 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.'"

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

This comment has been minimized.

Show comment Hide comment
@jmathai

jmathai Dec 19, 2011

Owner

Does simpleTest.php work?

Owner

jmathai commented Dec 19, 2011

Does simpleTest.php work?

@dhenriquez

This comment has been minimized.

Show comment Hide comment
@dhenriquez

dhenriquez Dec 21, 2011

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

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

This comment has been minimized.

Show comment Hide comment
@jmathai

jmathai Dec 28, 2011

Owner

@dhenriquez does simpleTest.php work for you?

Owner

jmathai commented Dec 28, 2011

@dhenriquez does simpleTest.php work for you?

@dhenriquez

This comment has been minimized.

Show comment Hide comment
@dhenriquez

dhenriquez Dec 28, 2011

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.

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

This comment has been minimized.

Show comment Hide comment
@jmathai

jmathai Jan 2, 2012

Owner

@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.

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

This comment has been minimized.

Show comment Hide comment
@Rpsl

Rpsl Feb 7, 2012

Guys, check date on your server.

Rpsl commented Feb 7, 2012

Guys, check date on your server.

@jmathai

This comment has been minimized.

Show comment Hide comment
@jmathai

jmathai Feb 7, 2012

Owner

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

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

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

This comment has been minimized.

Show comment Hide comment
@almacbe

almacbe 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.

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 join this conversation on GitHub. Already have an account? Sign in to comment