Posts tagged with facebook-graph-api

I'm currently working on a side project using the Meta Threads API. I'm trying to use the Media Insights API to build a feature that retrieves daily insights. However, even when I include the since and until parameters, the response always returns the same data—it only gives me the current insight values.

The image below is a screenshot from my side project.

screenshot of my work

Here’s the URL and parameters I’m using:

I also tried using the since and until parameters with the YYYY-MM-DD format, but it still returns the same result. For example:

  • since: 2024-09-13
  • until: 2024-09-14

Am I missing something, or is this an API bug? Any help would be greatly appreciated!

I wanted to see the daily changes in metrics like views, likes, and replies.

I am currently developing an app that interacts with Facebook Page content and messages using Facebook webhooks to receive event notifications when users engage with the page.

While I’ve successfully set up and received webhooks for most events, such as page messages and feed comments, I’m experiencing an issue where the webhook is not triggered when someone posts a comment that contains a video or GIF. It seems Facebook doesn’t send any event notifications when these types of media are included in the comment except PHOTO.

I’ve noticed other developers have reported similar issues in these threads, but there is no clear solution:

My goal: I need to capture comments that contain videos, GIFs, or stickers as soon as they are published. Actively polling for comments using the Graph API is not an ideal solution due to rate limits and the need for near real-time behavior.

Question: Has anyone found a solution or workaround for receiving these types of comments (with videos, GIFs, or stickers) in real-time using Facebook’s webhooks? Is there any other method to capture them efficiently without constantly querying the Graph API?

Any help or guidance would be greatly appreciated!

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've been making requests to the Product Catalog Products API using this URL:

https://graph.facebook.com/v20.0/[PRODUCT_CATALOG_ID]/products?access_token=[ACCESS_TOKEN]&filter={"name":{"i_contains":"Water"}}&fields=["retailer_id","name","description","price","visibility","inventory","url","image_url"]

Until recently, everything worked fine, but now the response only returns the name field. Here's an example of the response I'm getting:

{     "data": [         {             "name": "Water"         }     ],     "paging": {         "cursors": {             "before": "[BEFORE_CURSOR]",             "after": "[AFTER_CURSOR]"         },         "next": "[NEXT_URL]",         "previous": "[PREVIOUS_URL]"     } } 

The fields such as description, price, visibility, and others are missing. Has anyone encountered this issue, or are there changes to the API that I may have missed?

I'm trying to unlink a product catalog from a WhatsApp Business Account (WABA) via the Meta Graph API. Still, I can't find the appropriate API endpoint for this action.

From the Meta Business Manager, I noticed that when unlinking a catalog, the following request is made:

Request URL: https://business.facebook.com/api/graphql/ Request Method: POST { "input": { "waba_id": "WABA_ID_HERE", "catalog_id": "CATALOG_ID_HERE", "action": "UNLINK", "actor_id": "ACTOR_ID_HERE", "client_mutation_id": "" } }

However, this seems to be part of the internal GraphQL API, and I can't find a corresponding endpoint in the official Graph API documentation to unlink a catalog from a WABA.

Is there a specific Graph API endpoint or another method that allows unlinking a product catalog from a WABA through the official Meta Graph API? If so, could you provide details on implementing it or any alternative solution?

Thank you in advance for any help!