skip to Main Content

retrieve async ads insights results from FB ads API with pagination – Facebook api

I am using facebook-python-ads-sdk to make async calls for FB insights API as described. params = { "time_increment": 1, "level": "ad", "date_preset": "last_28d", "breakdowns": "hourly_stats_aggregated_by_advertiser_time_zone", "limit": 1000 } job = AdAccount("id").get_insights_async(params=params) result_cursor = wait_for_async_job(job) results = [item for item in…

VIEW QUESTION

FacebookAdsExceptionException: Connection timed out after 10000 milliseconds – Facebook api

I have a cron job that pulls data from Facebook very frequently all day long. Many times per day, I get an error like this one: FacebookAdsExceptionException: Connection timed out after 10001 milliseconds in /vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Adapter/CurlAdapter.php:196 Stack trace: #0 /vendor/facebook/php-ads-sdk/src/FacebookAds/Http/Client.php(204): FacebookAdsHttpAdapterCurlAdapter->sendRequest(Object(FacebookAdsHttpRequest))…

VIEW QUESTION
Back To Top
Search