Get `max_id` of of specific Instagram Story Poll Voters

1.4k Views Asked by At

I know that I can receive the Story data and the Poll voters data using getStoryPollVoters() which takes the following parameters:

* @param string      $storyId      The story media item's ID in Instagram's internal format (ie "1542304813904481224_6112344004").
* @param string      $pollId       The poll ID in Instagram's internal format (ie "17956159684032257").
* @param int         $votingOption Value that represents the voting option of the voter. 0 for the first option, 1 for the second option.
* @param string|null $maxId        Next "maximum ID", used for pagination.

I have successfully retrieved the $storyId, $pollId, $votingOption from another call and was using the result as the arguments for getStoryPollVoters(), however there is one more result without which I don't believe I can retrieve all the voters data.

When I request the above I get a max of ~50 responses per poll voting option but I know for a fact (based on what I have seen in the official instagram app) that there are more responses.

In the same request, I get the property more_available: true and it means that there are more, however it is followed by the property max_id, one that is the same optional argument for the function getStoryPollVoters().

My problem is that I would like to set this max_id but I do not know how to get the max_id for each story poll voting option. I have tried looking through the code to the barebones of the method but all I see is:

$request = $this->ig->request("media/{$storyId}/{$pollId}/story_poll_voters/")
            ->addParam('vote', $votingOption);

if ($maxId !== null) {
    $request->addParam('max_id', $maxId);
}

It is just an added parameter to the request, one that has little documentation in the repository and has a familiar format across other functionalities such as Feed, Comments, Friends etc. so my attempts to search online have been disappointing.

I wonder if anyone knows how – knowing the $storyId, $pollId & $votingOption – one can query the max_id in order to request all voter data?

Thank you in advance!

0

There are 0 best solutions below