I am trying to post on instagram using graph api but i am not able to post.
Content Publishing The Content Publishing API is a subset of Instagram Graph API endpoints that allow you to publish IG Media objects on Instagram Business IG Users.
Publishing media objects with this API is a two step process — you first create a media object container, then publish the container.
i try all the code but stil looking for solution
POST graph.facebook.com/17841400008460056/media
?image_url=https//www.example.com/images/bronz-fonz.jpg
&caption=#BronzFonz
i try this one but code is not returning a media object
Returning this kind of error:
Facebook\Exceptions\FacebookResponseException (#3) Application does not have the capability to make this API call. ↵ Caused by: Facebook\Exceptions\FacebookAuthenticationException (#3) Application does not have the capability to make this API call. in /home2/urmemesc/public_html/demoproqaz/src/Facebook/Exceptions/FacebookResponseException.php at line 142

The simple answer is you can't unless you are an Instagram Partner, for now you can't be an instagram partner because registration is in closed beta.
You can get more information from the link below:
https://developers.facebook.com/docs/instagram-api/guides/content-publishing/
UPDATE September 2020
Seems like it is possible now, I haven't tried it yet but the link below seems to suggest possibility
https://developers.facebook.com/docs/graph-api/using-graph-api/