Posts tagged with instagram

My app is registered on facebook and has been live since the past 2 years. Now, i switched it to development mode since i need to integrate with "Instagram API with Facebook login".

So after following the documentation, https://developers.facebook.com/docs/instagram-platform/instagram-api-with-facebook-login/business-login-for-instagram , i linked my insta business account to one of my facebook pages using this link https://www.facebook.com/business/help/connect-instagram-to-page (Note : My facebook account has 2 pages)

I also linked the fb account to insta account by following this : https://help.instagram.com/176235449218188

I have added instagram under products section in my registered app in facebook. I have not confgured anything with respect to "API Setup with facebook login" there.

Now, iam trying to access /me/accounts to get all the pages data and instagram business account id by including scopes "instagram_basic" and "instagram_content_publish"

But iam not getting any data in graph API tool. It just returns

{   "data": [   ] } 

I have tried to debug, but couldnt figure it out. Iam stuck at this point. Any help would be appreciated,thanks.

I'm using the Instagram Graph API via https://graph.facebook.com/v21.0 to publish both images and videos on Instagram. Publishing images works without issues, but I'm encountering a problem when attempting to publish videos.

Here’s my process:

1. Create Media Container for Video

I create a media container using the following request:

POST https://graph.facebook.com/v21.0/<user-id>/media {    video_url: video.mp4 (744k, 18s long H264 MPEG-4 AAC)    caption: caption    media_type: REELS    share_to_feed: true    access_token: ... } 

2. Publish Media Using the Container ID Then, I attempt to publish the video with this request:

POST https://graph.facebook.com/v21.0/<user-id>/media {     creation_id: <id-container>     access_token: ... } 

However, this returns a 500 error:

{     "error": {         "message": "An unknown error has occurred.",         "type": "OAuthException",         "code": 1,         "fbtrace_id": <trace-id>     } } 

I can't find anything on the community forum and the bug report is not working either. Any idea what I could try?

I am creating a web app which uses Facebook graph apis to allow users connect their Facebook and Instagram account to my app so we could automate content posting on their behalf. I have successfully implementend for Facebook but the problem is now with Instagram. After I initiate the auth url I am taken to a page where I'm asked to enter my IG email and password, a popup opens and I enter those details but it doesn't get past there, it just goes back to telling me to "Get started" which is where I started from.

I have been strugling with this problem for days now and would greatly appreciate any help I could get with this.

Another guess I have: Though I doubt that is the case but could this be happening because I am yet to submit my app for review? If so, why did it work for Facebook?

What I have tried:

  1. I have added and double checked my redirect_uri both on my website and my Facebook developers App
  2. Checked if this issue persists across multiple browsers

What I expect: After entering my instagram username and password, I should be redirected to my redirect_uri with the access_token and other requested information so I can process them

A few weeks ago, our app was approved with the following permissions:

instagram_business_manage_messages, instagram_manage_comments, instagram_manage_messages, instagram_business_manage_comments

and this is our login url with scopes, example -

https://www.instagram.com/oauth/authorize?third_party=re&client_id=867763&redirect_uri=oauth%2Fcallback&response_type=code&scope=business_basic%2Cbusiness_manage_messages%2Cbusiness_manage_comments%2Cbusiness_content_publish 

Our use case is as follows: when someone comments on our post with a matching keyword specified in our backend, we send a reply to that comment and simultaneously send a direct message (DM) to the user.

However, we're facing an issue where only 1 out of 100 comments successfully sends both the comment reply and DM. In other cases, the comment replies are sent consistently, but the DM fails with the error: "This message is sent outside of allowed window." This occurs 99% of the time.

Given that we have access to the Business API, we are unsure why we are facing this issue. Could you please advise?

this is the

error: {   error: {     message: 'This message is sent outside of allowed window.',     type: 'IGApiException',     code: 10,     error_subcode: 2534022,     fbtrace_id: 'ASeWzBS_LCXn'   } } 

same error code mentioned on fb docs https://developers.facebook.com/docs/messenger-platform/error-codes

We tried with different multiple accounts but same error, but when a user first sends a message to owner of insta post then again comments on post then it sending comment and dm successfully.

I'm tring to get tagged user in post. Currently I'm fetching user post using Business Discovery and some of the post data is possible to fetch. But for tagged user no information is post.

Is there way or endpoint that I'm just overlooking? or just simply not possible with Business Discovery?

Also if it not possible with Business Discovery I would like to know if there is any other way to do it.