fetch_pagination_url
Retrieve the next or previous page of results by providing a pagination URL from a Meta Ads insights API response.
Instructions
Fetch data from a Facebook Graph API pagination URL
Use this to get the next/previous page of results from an insights API call.
Args: url: The complete pagination URL (e.g., from response['paging']['next'] or response['paging']['previous']). It includes the necessary token and parameters.
Returns: The dictionary containing the next/previous page of results.
Example: ```python # Assuming 'initial_results' is the dict from a previous insights call if "paging" in initial_results and "next" in initial_results["paging"]: next_page_data = fetch_pagination_url(url=initial_results["paging"]["next"])
if "paging" in initial_results and "previous" in initial_results["paging"]:
prev_page_data = fetch_pagination_url(url=initial_results["paging"]["previous"])
```
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |