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