jmathai/twitter-async — Issue #136: EpiOAuthUnauthorizedException error not in local but in subdomains..
Author: archer247
Created: 2011-12-28 16:27:36+00:00
State: open

EpiOAuthUnauthorizedException: .

#0 /home/comiingl/.repo/htdocs/sites/default/modules/custom/comiingle_twitter/lib/EpiOAuth.php(404): EpiOAuthException::raise(Object(EpiCurlManager), false)
#1 /home/comiingl/.repo/htdocs/sites/default/modules/custom/comiingle_twitter/lib/EpiOAuth.php(53): EpiOAuthResponse->__get('oauth_token')
#2 /home/comiingl/.repo/htdocs/sites/default/modules/custom/comiingle_twitter/lib/EpiOAuth.php(60): EpiOAuth->getAuthorizeUrl(NULL)
#3 /home/comiingl/.repo/htdocs/sites/default/modules/custom/comiingle_twitter/comiingle_twitter.module(61): EpiOAuth->getAuthorizationUrl()
#4 /home/comiingl/.repo/htdocs/sites/default/modules/custom/comiingle_pages/includes/comiingle_pages.blocks.inc(245): _comiingle_twitter_wallpost()
#5 [internal function]: _comiingle_pages_twitter_ajax_login()
#6 /home/comiingl/.repo/htdocs/includes/menu.inc(503): call_user_func_array('_comiingle_page...', Array)
#7 /home/comiingl/.repo/htdocs/index.php(21): menu_execute_active_handler()
#8 {main}

$_REQUEST:
Array
(
[Drupal_tableDrag_showWeight] => 0
[__utma] => 144383541.886879457.1323126003.1323275309.1323282960.3
[__utmz] => 144383541.1323126003.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
[__qca] => P0-1275361382-1323789814597
[Drupal_visitor_admin_compact_mode] => 1
[DrupalAdminToolbar] => expanded=0&activeTab=admin-menu
[has_js] => 1
[SESSc8219160ad9691d18afe162140797d7b] => kC5K63vo67fNGG5ZWngSM3iphDLbG5USWAUEyvMUCA8
)

REQUEST_URI:
/ajax/login-twitter

its the error my application has the read,write and direct messages permission, im sure that the keys are been sent to the twitter server...

this is my function for obtaining the url of twitter...

define('TWITTER_CONSUMER_KEY', '******');
define('TWITTER_CONSUMER_SECRET', '*******');

function _comiingle_twitter_wallpost() {

$twitterObj = new EpiTwitter(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);

$validation = (object) null;
//$login = l('Tweet', $twitterObj->getAuthorizationUrl());

/*
* THIS VALIDATION IS KIND OF WRONG, I DON'T UNDERSTAND
* WHY IS CHECKING THE SAME VARIABLES TWICE???
*/
if (isset($_GET['oauth_token']) || (isset($_SESSION['oauth_token']) && (isset($_SESSION['oauth_token_secret'])))) {

if (isset($_SESSION['oauth_token']) || (isset($_SESSION['oauth_token_secret']))) {
$twitterObj->setToken($GET['oauth_token']);
$token = $twitterObj->getAccessToken();
$_SESSION['oauth_token'] = $token->oauth_token;
$_SESSION['oauth_token_secret'] = $token->oauth_token_secret;
} else {
$twitterObj->setToken($_SESSION['oauth_token'], $_SESSION['oauth_token_secret']);
}
$user = $twitterObj->get_accountVerify_credentials();
} elseif (isset($_GET['denied'])) {
$validation->status = 1;
$validation->value = $twitterObj->getAuthorizationUrl();
}

if (!empty($validation->status)) {
return $validation;
}
$validation->status = 0;
$validation->value = $twitterObj->getAuthorizationUrl();

return $validation;
}

please would you help me?, as i said before, it works on my locals, but in the real server doesnt work :@