From 8877223cbdf84d008f601215465f5afc1e2c0385 Mon Sep 17 00:00:00 2001 From: airt Date: Tue, 20 Feb 2024 15:08:14 +0800 Subject: [PATCH] source facebook pages: upgrade v19.0 --- .../source_facebook_pages/manifest.yaml | 3 +-- .../source_facebook_pages/schemas/page.json | 3 --- .../source-facebook-pages/unit_tests/initial_record.json | 2 +- .../source-facebook-pages/unit_tests/test_streams.py | 2 +- .../unit_tests/transformed_record.json | 2 +- docs/integrations/sources/facebook-pages.md | 9 +++++---- 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/manifest.yaml b/airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/manifest.yaml index 51f1081cae50..2d7e66e0f96f 100644 --- a/airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/manifest.yaml +++ b/airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/manifest.yaml @@ -8,7 +8,7 @@ definitions: extractor: field_path: ["data"] requester: - url_base: "https://graph.facebook.com/v15.0" + url_base: "https://graph.facebook.com/v19.0" http_method: "GET" error_handler: type: CompositeErrorHandler @@ -142,7 +142,6 @@ definitions: 'members', 'merchant_review_status', 'messenger_ads_default_icebreakers', - 'messenger_ads_default_page_welcome_message', 'messenger_ads_default_quick_replies', 'messenger_ads_quick_replies_type', 'mission', diff --git a/airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/schemas/page.json b/airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/schemas/page.json index 7e317e982429..907981708c12 100644 --- a/airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/schemas/page.json +++ b/airbyte-integrations/connectors/source-facebook-pages/source_facebook_pages/schemas/page.json @@ -273,9 +273,6 @@ "type": ["string", "null"] } }, - "messenger_ads_default_page_welcome_message": { - "$ref": "messengerdestinationpagewelcomemessage.json" - }, "messenger_ads_default_quick_replies": { "type": ["array", "null"], "items": { diff --git a/airbyte-integrations/connectors/source-facebook-pages/unit_tests/initial_record.json b/airbyte-integrations/connectors/source-facebook-pages/unit_tests/initial_record.json index 0193cd73819b..e1d164ae8c8e 100644 --- a/airbyte-integrations/connectors/source-facebook-pages/unit_tests/initial_record.json +++ b/airbyte-integrations/connectors/source-facebook-pages/unit_tests/initial_record.json @@ -231,7 +231,7 @@ "before": "cursor", "after": "cursor" }, - "next": "https://graph.facebook.com/v15.0/" + "next": "https://graph.facebook.com/v19.0/" } }, "indexed_videos": { diff --git a/airbyte-integrations/connectors/source-facebook-pages/unit_tests/test_streams.py b/airbyte-integrations/connectors/source-facebook-pages/unit_tests/test_streams.py index ddad5194e5e3..2de8bd692121 100644 --- a/airbyte-integrations/connectors/source-facebook-pages/unit_tests/test_streams.py +++ b/airbyte-integrations/connectors/source-facebook-pages/unit_tests/test_streams.py @@ -10,7 +10,7 @@ def test_retries(mocker, requests_mock, error_code): mocker.patch("time.sleep") requests_mock.get("https://graph.facebook.com/1?fields=access_token&access_token=token", json={"access_token": "access"}) - requests_mock.get("https://graph.facebook.com/v15.0/1", [{"status_code": error_code}, {"json": {"data": {}}}]) + requests_mock.get("https://graph.facebook.com/v19.0/1", [{"status_code": error_code}, {"json": {"data": {}}}]) source = SourceFacebookPages() stream = source.streams({"page_id": 1, "access_token": "token"})[0] for slice_ in stream.stream_slices(sync_mode="full_refresh"): diff --git a/airbyte-integrations/connectors/source-facebook-pages/unit_tests/transformed_record.json b/airbyte-integrations/connectors/source-facebook-pages/unit_tests/transformed_record.json index 93a6a6a74a67..c7066f059a0c 100644 --- a/airbyte-integrations/connectors/source-facebook-pages/unit_tests/transformed_record.json +++ b/airbyte-integrations/connectors/source-facebook-pages/unit_tests/transformed_record.json @@ -231,7 +231,7 @@ "before": "cursor", "after": "cursor" }, - "next": "https://graph.facebook.com/v15.0/" + "next": "https://graph.facebook.com/v19.0/" } }, "indexed_videos": { diff --git a/docs/integrations/sources/facebook-pages.md b/docs/integrations/sources/facebook-pages.md index 7055a1f798a9..fec8ad387f27 100644 --- a/docs/integrations/sources/facebook-pages.md +++ b/docs/integrations/sources/facebook-pages.md @@ -61,10 +61,10 @@ The Facebook Pages source connector supports the following [sync modes](https:// ## Supported Streams -- [Page](https://developers.facebook.com/docs/graph-api/reference/v15.0/page/#overview) -- [Post](https://developers.facebook.com/docs/graph-api/reference/v15.0/page/feed) -- [Page Insights](https://developers.facebook.com/docs/graph-api/reference/v15.0/page/insights) -- [Post Insights](https://developers.facebook.com/docs/graph-api/reference/v15.0/insights) +- [Page](https://developers.facebook.com/docs/graph-api/reference/v19.0/page/#overview) +- [Post](https://developers.facebook.com/docs/graph-api/reference/v19.0/page/feed) +- [Page Insights](https://developers.facebook.com/docs/graph-api/reference/v19.0/page/insights) +- [Post Insights](https://developers.facebook.com/docs/graph-api/reference/v19.0/insights) ## Data type map @@ -85,6 +85,7 @@ See Facebook's [documentation on rate limiting](https://developers.facebook.com/ | Version | Date | Pull Request | Subject | | :------ | :--------- | :------------------------------------------------------- | :------------------------------------------------------------------------ | +| 0.3.1 | 2024-02-20 | [00000](https://github.com/airbytehq/airbyte/pull/00000) | Upgrade Facebook API to v19.0 | | 0.3.0 | 2023-06-26 | [27728](https://github.com/airbytehq/airbyte/pull/27728) | License Update: Elv2 | | 0.2.5 | 2023-04-13 | [26939](https://github.com/airbytehq/airbyte/pull/26939) | Add advancedAuth to the connector spec | | 0.2.4 | 2023-04-13 | [25143](https://github.com/airbytehq/airbyte/pull/25143) | Update insight metrics request params |