Notification texts go here Contact Us Buy Now!

How to get last updated Facebook ads

**How to Get Last Updated Facebook Ads** **Introduction** Stay up-to-date with your Facebook advertising campaigns by filtering them based on their last updated time. This feature allows you to retrieve ads that have been recently modified to track performance and make data-driven decisions. **Filtering Option** To filter ads, use the `filtering` parameter with the following format: ``` filtering=[{field: "<object>.updated_time", operator: ">\>", value: <unix time>}] ``` **Step-by-Step Guide** **1. Unix Time**: Convert the desired filter date into Unix timestamp using a conversion tool. For example, to retrieve ads updated after February 1, 2018, use: ``` 1517443200 ``` **2. Campaign Retrieval**: To retrieve all campaigns updated after February 1, 2018, use the following cURL command: ``` curl -G \ -d 'access_token=<ACCESS_TOKEN>' \ -d 'filtering=[{field:"campaign.updated_time",operator:">\>",value:1517443200}]' \ 'https://graph.facebook.com/v2.12/act_<ACCOUNT_ID>/campaigns' ``` **Note**: Replace `` and `` with your actual values. **3. Python Example**: To filter ad sets that were updated in the last one day using Python, use the following code: ```python import facebook # Get the Facebook graph API access token access_token = '' # Initiate an API call object graph = facebook.GraphAPI(access_token=access_token, version='2.12') # Set the start time for filtering last_24_hours = int(time.time()) - 86400 # Make the API call to retrieve ad sets ad_sets = graph.get_object('act_<ACCOUNT_ID>/adsets', fields='name,updated_time', filtering=[{'field': 'adset.updated_time', 'operator': '>\>', 'value': last_24_hours}]) ```

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.