TijsVerkoyen\Twitter\Twitter::accountUpdateProfile PHP Method

accountUpdateProfile() public method

Sets values that users are able to set under the "Account" tab of their settings page. Only the parameters specified will be updated.
public accountUpdateProfile ( string[optional] $name = null, string[optional] $url = null, string[optional] $location = null, string[optional] $description = null, bool[optional] $includeEntities = null, bool[optional] $skipStatus = null ) : array
$name string[optional]
$url string[optional]
$location string[optional]
$description string[optional]
$includeEntities bool[optional]
$skipStatus bool[optional]
return array
    public function accountUpdateProfile($name = null, $url = null, $location = null, $description = null, $includeEntities = null, $skipStatus = null)
    {
        // build parameters
        $parameters = null;
        if ($name != null) {
            $parameters['name'] = (string) $name;
        }
        if ($url != null) {
            $parameters['url'] = (string) $url;
        }
        if ($location != null) {
            $parameters['location'] = (string) $location;
        }
        if ($description != null) {
            $parameters['description'] = (string) $description;
        }
        if ($includeEntities !== null) {
            $parameters['include_entities'] = $includeEntities ? 'true' : 'false';
        }
        if ($skipStatus !== null) {
            $parameters['skip_status'] = $skipStatus ? 'true' : 'false';
        }
        // make the call
        return $this->doCall('account/update_profile.json', $parameters, true, 'POST');
    }

Usage Example

 /**
  * Tests Twitter->accountUpdateProfile
  */
 public function testAccountUpdateProfile()
 {
     $response = $this->twitter->accountUpdateProfile(null, 'http://github.com/tijsverkoyen/TwitterOAuth');
     $this->isUser($response);
 }
Twitter