Closed arislanhaikal closed 6 months ago
Hello, I will be home in a few hours, I will test and get back to you.
Hello, I did a review. The response of the mentioned getUserInfoFromUsername function contains only information about the username.
If you want to receive media, you need to use the getFeed function from the mobile API.
example:
$api->user->getFeed(null, $userid);
Nice, What do you mean in manuel?
$api->manuel->getFeed(null, $userid);
This is only return the first 12 medias. Can it possible to get next page medias?
There is next media id in the incoming response, you need to add it to the request. (copy and paste the function and edit the 2nd function)
Response getFeed function like this. How do I move to the next page?
Can you elaborate function with example?
Sorry I ask many questions :)
Hello, I am on holiday (it will last 1 week). After 1 week, write something here again and remind me, I will send you the new function.
Hi @suphiyasin, have you finished your holiday? I waiting for you
Hello yes I am back, thank you for reminding me. I didn't have a chance to test it, but this code should work.
public function getMoreMedia($userid = null, $nextmediaid){
$userid = $userid ?? $this->userid;
$url = $this->apibase.'/api/v1/feed/user/'.$userid.'/?exclude_comment=true&max_id='.$nextmediaid.'&only_fetch_first_carousel_media=false';
$sendRequest = $this->getwithcookie($url, null);
return $sendRequest;
}
Hi, I need some help to get medias I try to get user info with
$api->webapi->getUserInfoFromUsername($token, $username);
I see this user response include _edge_owner_to_timelinemedia But no medias edges included and with response empty array
Is there a special function to retrieve media?
Thank for your awesome tools