I'm working on an app where I need to fetch all instagram posts of a user. The user is logged in with Instagram Api with Facebook Login

I get well the id of the instagram business account and the different tokens needed but when I try to fetch the posts there is two possible answers and none of them is the one I want.

If I request https://graph.instagram.com/v21.0/<instagramId>/media?fields=id,children{{media_type,media_product_type,media_url,thumbnail_url,timestamp,like_count,comment_count}},media_product_type,media_type,media_url,thumbnail_url,timestamp,like_count,comments_count&access_token=<token> I receive a 400 answer "this action is unavailable" Which seems normal because the user is logged in through Facebook so I should pass by Facebook graph api.

But when I request https://graph.facebook.com/v21.0/<instagramId>/media?fields=id&access_token=<token> I only fetch the reels not the posts.

Any idea?

Tag:facebook, facebook-graph-api, instagram-api, instagram-graph-api

Add a new comment.