src/Widop/Twitter/OAuth/OAuth.php
public function getBearerToken($grantType = 'client_credentials')
    {
        $request = $this->createRequest('/oauth2/token');
        $request->setPostParameter('grant_type', $grantType);
        $this->signRequest($request, new BasicToken());

        return $this->createBearerToken($this->sendRequest($request));
    }
public function getBearerToken($grantType = 'client_credentials')
    {
        $request = $this->createRequest('/oauth2/token');
        $request->setPostParameter('grant_type', $grantType);
        $this->signRequest($request, new BasicToken());

        return $this->createBearerToken($this->sendRequest($request));
    }
public function getBearerToken ( $ grantType = 'client_credentials' ) { $ request = $ this -> createRequest ( '/oauth2/token' ) ; $ request -> setPostParameter ( 'grant_type' , $ grantType ) ; $ this -> signRequest ( $ request , new BasicToken ( ) ) ; return $ this -> createBearerToken ( $ this -> sendRequest ( $ request ) ) ; }
Gets a bearer token.

@param string $grantType The OAuth grant type.

@return \Widop\Twitter\OAuth\Token\BearerToken The bearer token.
Gets a bearer token .