Created an app in https://apps.twitter.com/app/ and got API key & API secret. ‘Authorize URL’ get when CallbackURL given as ‘http://server.com/codebird/src/check.php’. When I changed the callbackURL to ‘http://server.comt/root/newsletter_campaign/social_auth’, then ‘Authorize URL’ is not getting. Used the codebird php and below is the script.
session_start();
require_once ('codebird.php');
$cb = \Codebird\Codebird::getInstance();
$cb->setConsumerKey('XXX', 'XX');
$reply = $cb->oauth_requestToken(array(
'oauth_callback' => 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']
));
// store the token
$cb->setToken($reply->oauth_token, $reply->oauth_token_secret);
$_SESSION['oauth_token'] = $reply->oauth_token;
$_SESSION['oauth_token_secret'] = $reply->oauth_token_secret;
$_SESSION['oauth_verify'] = true;
// redirect to auth website
$auth_url = $cb->oauth_authorize();
header('Location: ' . $auth_url);
die();
Page became blank/break on the line. $reply = $cb->oauth_requestToken(array());
Please help us to solved the problem.