Posts tagged with facebook-graph-api

When using instagram graph api of meta, rate limit is the number of API calls an app or user can make within a given time period. Calls within one hour = 200 * Number of Users. But when the number of user be increased, will total_time (A whole number expressing the percentage of total time allotted for query processing.) be increased too?

Will total_time be increased too?

I am using meta business suite leads center screen to manage potential candidates. But I want to write a tool to export the information on the screen of each candidate such as label, Assigned to, Stage.. to save to a separate database system.

Leads center image

I also know the api below can get basic information, but it seems to need ad_id, form_id. Although I am not using any ad at the moment. Can it be solved using webhook?

https://developers.facebook.com/docs/marketing-api/guides/lead-ads/retrieving

I'm trying to fetch insights for my ad sets using the Facebook Graph API. Here are the parameters and the request I'm making:

params_insights_get = {     "access_token": "ACCESS_TOKEN",     "level": "adset",     "fields": "reach,impressions,estimated_ad_recall_rate,frequency,full_view_impressions,full_view_reach,clicks,inline_link_clicks,outbound_clicks,video_play_retention_0_to_15s_actions,video_play_retention_20_to_60s_actions,actions,spend,instagram_upcoming_event_reminders_set,inline_link_click_ctr,outbound_clicks_ctr,unique_inline_link_clicks,cost_per_ad_click,cost_per_conversion,cost_per_one_thousand_ad_impression,cost_per_outbound_click,cost_per_thruplay,cost_per_unique_action_type,cost_per_unique_click,cost_per_unique_inline_link_click,cost_per_unique_outbound_click,cost_per_action_type,cpc,cpm,cpp,ctr,optimization_goal,adset_id,adset_name", } root_url = f"https://graph.facebook.com/v19.0/" campaigns_ext = "/campaigns" adsets_ext = "/adsets" insights_ext = "/insights" response_insights_get = requests.get(     root_url + campaign_id + insights_ext, params=params_insights_get ) 

This was working fine for the last six months. However, recently, I keep getting the following error response:

{     "error": {         "message": "Service temporarily unavailable",         "type": "OAuthException",         "is_transient": False,         "code": 2,         "error_subcode": 1504018,         "error_user_title": "Your request timed out",         "error_user_msg": "Please try a smaller date range, fetch less data, or use async jobs",         "fbtrace_id": "AvoEH7ogR7jlllCmCC943cH",     } } 

The date range I need is 7 days, i.e. the default value, and I need all the data in the query. I've tried async jobs, but the jobs keep failing. Interestingly, this only affects one particular campaign in my sample adaccount, the others work fine.

After my research it is very hard to pass this(I mention below) step to use Graph API.

Business verification This is required to get access to data from users (for some apps this is called advanced access). Only people with full control of a Business Account can complete this process. Learn more about business verification.

Is there any way or package to get data from facebook in .net platform?

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?