Instagram\Instagram::getUserFollowers PHP Method

getUserFollowers() public method

Get User Followers
public getUserFollowers ( string | User $userId, string $maxId ) : FollowersFriendshipResponse
$userId string | Instagram\API\Response\Model\User User or User Id to get Followers of
$maxId string Next Maximum Id, used for Pagination
return Instagram\API\Response\FollowersFriendshipResponse
    public function getUserFollowers($userId, $maxId)
    {
        if (!$this->isLoggedIn()) {
            throw new InstagramException("You must be logged in to call getUserFollowers().");
        }
        if ($userId instanceof User) {
            $userId = $userId->getPk();
        }
        $request = new FollowersFriendshipRequest($this, $userId, $maxId);
        $response = $request->execute();
        if (!$response->isOk()) {
            throw new InstagramException(sprintf("Failed to getUserFollowers: [%s] %s", $response->getStatus(), $response->getMessage()));
        }
        return $response;
    }