ageofneil opened a new issue #18845:
URL: https://github.com/apache/airflow/issues/18845
### Apache Airflow Provider(s)
facebook
### Versions of Apache Airflow Providers
2.0.1
### Apache Airflow version
2.1.1
### Operating System
Ubuntu 20.04
### Deployment
Docker-Compose
### Deployment details
_No response_
### What happened
Task fails because the hook uses a deprecated Facebook API version. The hook
is calling v6.0 which is longer supported.
### What you expected to happen
I expected this task to connected to the Facebook API and fetch the
requested data.
My log files for the failed task output the following message:
```
facebook_business.exceptions.FacebookRequestError:
Message: Call was not successful
Method: POST
Path: https://graph.facebook.com/v6.0/act_1210763848963620/insights
Params: {'level': 'ad', 'date_preset': 'yesterday', 'fields':
'["campaign_name","campaign_id","ad_id","clicks","impressions"]'}
Status: 400
Response:
{
"error": {
"message": "(#2635) You are calling a deprecated version of the Ads
API. Please update to the latest version: v11.0.",
"type": "OAuthException",
"code": 2635,
"fbtrace_id": "AGRidwR5VhjU3kAJVUSkvuz"
}
}
```
Line 69 of
https://github.com/apache/airflow/blob/main/airflow/providers/facebook/ads/hooks/ads.py
should be changed to a newer API version.
### How to reproduce
Run the sample DAG posted here:
https://airflow.apache.org/docs/apache-airflow-providers-google/stable/_modules/airflow/providers/google/cloud/example_dags/example_facebook_ads_to_gcs.html
### Anything else
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]