Posts tagged with instagram-graph-api

I am trying to fetch data from some Instagram accounts that are on Meta Business Suite, most of them I have success to retrieve using Graph API and Instagram API, but one of them I cannot find in documentation.

It is Link Clicks on Instagram Accounts.

So I need help to retrieve this metric. Can someone help me?

I have tried these metrics: website_clicks, text_message_clicks, phone_call_clicks and profile_links_taps but none of them is the number that shows on Business Suite even adding those metrics.

I have been reading all over documentation but it is so confusing and annoying.

I can retrieve insights for posts made directly on Instagram, but I face an issue with combined insights for posts shared on both Instagram and Facebook.

Here's the scenario: When I post a reel on Instagram and enable the option to automatically share it on Facebook, the combined views shown on Instagram reflect views from both platforms. For example, if the reel generates 10,000 views on Instagram and an additional 5,000 views on Facebook, Instagram's app displays a total of 15,000 views. However, when I call the API (GET /{ig-media-id}/insights), it only returns the 10,000 views from Instagram, excluding the 5,000 views from Facebook.

I've spent a considerable amount of time trying to figure out how to obtain the combined insights (similar to the view shown in Instagram's app) through the API but have had no luck. I am aware that this is possible since I've seen analytics platforms display the combined numbers in their reports.

What I've Tried:

  1. Using the Instagram Graph API endpoint GET /{ig-media-id}/insights to retrieve insights, but it only returns Instagram-specific data.
  2. Searching through Facebook Graph API documentation for a way to aggregate insights from both platforms.
  3. Experimenting with various metrics and parameters to ensure no data is left out.
  4. Attempting to get insights from the Facebook page itself, but these always return empty since the page isn't being used directly.

Is there a specific API endpoint or method to retrieve the combined insights for Instagram posts shared on both Instagram and Facebook? How can I get the same combined views data that Instagram displays within its app?

I've searched everywhere, and the Facebook API doesn't allow obtaining a sample message from Instagram until it passes review. Does anyone know or can provide an example of what the response looks like from the API for a message where someone sent a reel?

I tried sending a message to myself from the same account, from another account, but the Graph API doesn't return data like it does for a Facebook page, unfortunately.

I'm developing an app using the Instagram messaging / send api and am sporadically getting this error

Request

data=f'recipient={{"id":"{reply_recipient_id}"}}&message={{"text":"{rm}"}}' r = requests.post("https://graph.facebook.com/v20.0/me/messages?access_token={}".format(access_token), data=data) 

Response

{'error': {'message': '(#100) Empty text', 'type': 'OAuthException', 'code': 100, 'error_subcode': 2534052, 'fbtrace_id': 'ABtZnf58ICsDpqWwJslG2wD'}} 

Any idea on what this is?

Thanks

I want to do social media listening for public data on FB and IG using the Graph API, but it's asking for business verification. How do companies get data without scrapers? Any suggestions on accessing data without business verification?

I was unsuccessful using the GRAPH API, due to the requirement of business verification. I am looking to understand how companies do social media listening as it is an integral part right now.