src/Twitter/Connections/AppConnection.php
private function createBearerCredentials()
    {
        //URL encode the consumer key and consumer secret
        $consumerKey = rawurlencode($this->credentials->getConsumerKey());
        $consumerSecret = rawurlencode($this->credentials->getConsumerSecret());

        //create bearer token credentials by concatenating the consumer key and consumer secret, seperated by a colon.
        $bearerTokenCredentials = $consumerKey . ':' . $consumerSecret;

        //base64 encode the bearer token credentials
        return base64_encode($bearerTokenCredentials);
    }
private function createBearerCredentials()
    {
        //URL encode the consumer key and consumer secret
        $consumerKey = rawurlencode($this->credentials->getConsumerKey());
        $consumerSecret = rawurlencode($this->credentials->getConsumerSecret());

        //create bearer token credentials by concatenating the consumer key and consumer secret, seperated by a colon.
        $bearerTokenCredentials = $consumerKey . ':' . $consumerSecret;

        //base64 encode the bearer token credentials
        return base64_encode($bearerTokenCredentials);
    }
Creates and returns an encoded bearer token credentials to be used for making calls to Twitter.

Currently:
- URL encode consumer key and consumer secret
- Create bearer token credentials
- Base64 encode the resulting value and return.

@link https://dev.twitter.com/docs/auth/application-only-auth Bearer Token Description

@return string base64 encoded bearer token.