public followersIds ( string[optional] $userId = null, string[optional] $screenName = null, string[optional] $cursor = null, bool[optional] $stringifyIds = true ) : array | ||
$userId | string[optional] | |
$screenName | string[optional] | |
$cursor | string[optional] | |
$stringifyIds | bool[optional] | |
리턴 | array |
public function followersIds($userId = null, $screenName = null, $cursor = null, $stringifyIds = true)
{
// validate
if ($userId == '' && $screenName == '') {
throw new Exception('Specify an userId or a screenName.');
}
// build parameters
if ($userId != null) {
$parameters['user_id'] = (string) $userId;
}
if ($screenName != null) {
$parameters['screen_name'] = (string) $screenName;
}
if ($cursor != null) {
$parameters['cursor'] = (string) $cursor;
}
$parameters['stringify_ids'] = (bool) $stringifyIds ? 'true' : 'false';
// make the call
return $this->doCall('followers/ids.json', $parameters, true);
}
/** * Tests Twitter->followersIds */ public function testFollowersIds() { $response = $this->twitter->followersIds(null, 'tijsverkoyen'); $this->assertArrayHasKey('ids', $response); $this->assertArrayHasKey('next_cursor', $response); $this->assertArrayHasKey('previous_cursor', $response); }