Instagram\Instagram::unblockUser PHP Method

unblockUser() public method

Unblock User
public unblockUser ( string | User $userId ) : UnblockFriendshipResponse
$userId string | Instagram\API\Response\Model\User User or User Id to Unblock
return Instagram\API\Response\UnblockFriendshipResponse
    public function unblockUser($userId)
    {
        if (!$this->isLoggedIn()) {
            throw new InstagramException("You must be logged in to call unblockUser().");
        }
        if ($userId instanceof User) {
            $userId = $userId->getPk();
        }
        $request = new UnblockFriendshipRequest($this, $userId);
        $response = $request->execute();
        if (!$response->isOk()) {
            throw new InstagramException(sprintf("Failed to unblockUser: [%s] %s", $response->getStatus(), $response->getMessage()));
        }
        return $response;
    }