php - Instagram Stories API - does not return a media url
Get the solution ↓↓↓
I am using this API
https://developers.facebook.com/docs/instagram-api/reference/user/stories/#stories
I was able to grab the media details but was wondering why not all stories returns amedia_url even if themedia_type isVIDEO, then when I looked at the story in IG it has a video in it? Other stories returns a complete set of media details but some do not return complete media details.
This is my code:
$mediaFields = [
'caption',
'children{id,media_type,media_url}',
'id',
'ig_id',
'like_count',
'media_type',
'media_url',
'owner',
'permalink',
'shortcode',
'thumbnail_url',
'timestamp',
'username',
];
$params = [
'fields' => implode(',', $mediaFields)
];
$query = http_build_query($params);
$response = $this->get("$instagramUserId/stories".'?'.$query);
Why is this happening? is this a privacy stuff from IG or my code needs a bit tweaking?
Thanks.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: the browser (or proxy) sent a request that this server could not understand.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

