Method | Description | |
---|---|---|
__construct ( array $config ) | ||
getAccessTokens ( string $request_token, string $request_secret, string $oauth_verifier ) : array | Makes a Request to get the user access tokens | |
getAuthorizeUrl ( array $params = [] ) : array | Gets the authorization url. | |
getLastReqInfo ( ) : array | ||
getUserTokens ( ) : array | Gets the current user tokens | |
handleError ( |
||
makeRequest ( $url, array $params = [], string $method = 'GET', boolean $multipart = false ) : array | mixed | ||
setUserTokens ( string $at, string $ats ) | Sets the current user tokens | |
uploadMedia ( string $image ) : array | mixed |
Method | Description | |
---|---|---|
OAuthRequest ( $url, array $params = [], string $method = 'GET', null $callback = null, boolean $multipart = false ) : array | |
||
parseResponse ( $string ) : array |
public getAuthorizeUrl ( array $params = [] ) : array | ||
$params | array | Custom parameters passed to the OAuth request |
return | array | If successful, returns an array with 'auth_url', 'secret' and 'token'; otherwise, returns an array with error code and message. |
public getUserTokens ( ) : array | ||
return | array | Returns an array where the first position is the Access Token and the second position is the Access Token Secret |
public handleError ( |
||
$response | ||
return | array |
public setUserTokens ( string $at, string $ats ) | ||
$at | string | Access Token |
$ats | string | Access Token Secret |