Authorize URL problem in Codebird API using php



Created an app in and got API key & API secret. ‘Authorize URL’ get when CallbackURL given as ‘’. 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.

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

Page became blank/break on the line. $reply = $cb->oauth_requestToken(array());

Please help us to solved the problem.