Posts tagged with facebook-graph-api

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.

For my Use case, im planning a Live demo where i start an Instagram Marketing Campaign. After launching the Ads, the goal is to present an Instagram Account where the Advertisement can be seen. So it really only needs to be visible on that specific account.

Whats the best way to do this?

  • I saw that there is a sandbox mode, but it states that it doesnt actually launch ads. is that correct?
  • Are the are other test environments i could use?
  • If it has to be the real instagram, is it even possible to narrow the targeting down to a point it could be a guaranteed to show up on that account?

I use Facebook Graph API to get my ads insights. However, I notice small discrepancies (a few people or a few dozen) when I fetch the data for the previous day at different times. This is likely due to Facebook API caching. I couldn't find information on how long it takes for these data to stabilize (for example, GA4 states that data stabilizes after 48 hours). Could anyone provide some details on this ? Thanks.

I couldn't find specific time range.

I want to get Leadinfo from my Lead ads using python and the facebook API.

I have tried this:

import json from facebook_business.api import FacebookAdsApi from facebook_business.adobjects.adaccount import AdAccount from facebook_business.adobjects.leadgenform import LeadgenForm from facebook_business.adobjects.lead import Lead access_token = '<my_token>' ad_account_id = 'act_my_ad_acount' FacebookAdsApi.init(access_token=access_token) ad_account = AdAccount(ad_account_id) ads = ad_account.get_ads(fields=[         Ad.Field.id,         Ad.Field.name,     ]) leads = [] for ad in ads:   lead = ad.get_leads(fields=[     Lead.Field.id,     Lead.Field.field_data     ])   leads.extend(lead) print(leads) 

However it breaks due to this error:

There have been too many calls from this ad-account. Please wait a bit and try again. 

I understand that I should be doing some kind of batch call. But I found the documentation too hard do understand. It took me three days just get the code to list the ads in my account.

Could someone, please help me?

My end goal is to retrieve the information that the users sent on the leadforms ads, ei. their name, telephone, etc..

Is there a way to get the account restrictions from the Whatsapp business account api?

More specifically I want to get the account restricted in the screenshot:

I have explored the available endpoints but couldn’t find any that provide this information. I’ve tried already:

• Checking the https://graph.facebook.com/{{api-version}}/{{business-account-id}} endpoint but it doesn’t seem to return any related info.

Reviewing the documentation but didn’t find relevant information about account restrictions.

Thanks in advance for your help!