TijsVerkoyen\Twitter\Twitter::accountUpdateProfile PHP 메소드

accountUpdateProfile() 공개 메소드

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]
리턴 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

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