@orchesty/connector-facebook-ads 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,76 @@
1
+ # Facebook Ads Connector
2
+
3
+ [![npm](https://img.shields.io/npm/v/@orchesty/connector-facebook-ads?color=15ba68)](https://www.npmjs.com/package/@orchesty/connector-facebook-ads)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-15ba68)](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE)
5
+
6
+ An [Orchesty](https://orchesty.io) connector for Facebook Ads, the Meta advertising platform that allows businesses to create and manage ad campaigns across Facebook, Instagram, Messenger, and WhatsApp.
7
+
8
+ ## Application Type
9
+
10
+ **OAuth 2.0**
11
+
12
+ This connector uses the Facebook OAuth 2.0 authorization flow with the `ads_management` and `ads_read` scopes. After entering your credentials in Orchesty, you will be redirected to Facebook to authorize access.
13
+
14
+ | Field | Description |
15
+ |---|---|
16
+ | `client_id` | Your Meta app Client ID from the Meta Developer Portal |
17
+ | `client_secret` | Your Meta app Client Secret from the Meta Developer Portal |
18
+
19
+ ## Components
20
+
21
+ | Class | Type | Description |
22
+ |---|---|---|
23
+ | `FacebookCreateCampaigns` | Connector | Creates a new ad campaign for an ad account via `POST /v12.0/act_{accountId}/campaigns` |
24
+
25
+ ## Setup
26
+
27
+ ### Credentials
28
+
29
+ 1. Go to [Meta for Developers](https://developers.facebook.com/apps) and create a new app (type: **Business**).
30
+ 2. Add the **Marketing API** product to your app.
31
+ 3. Under **Settings → Basic**, note the **App ID** (Client ID) and **App Secret** (Client Secret).
32
+ 4. Under **App Review**, request access to the `ads_management` and `ads_read` permissions.
33
+ 5. Add the Orchesty OAuth callback URL to **Valid OAuth Redirect URIs** under **Facebook Login → Settings**.
34
+ 6. In Orchesty, open the Facebook Ads application settings, fill in the Client ID and Client Secret, then complete the OAuth authorization flow.
35
+
36
+ ### API Documentation
37
+
38
+ Meta Marketing API: [https://developers.facebook.com/docs/marketing-api/](https://developers.facebook.com/docs/marketing-api/)
39
+
40
+ ## Installation & Usage
41
+
42
+ Install the package:
43
+
44
+ ```bash
45
+ npm install @orchesty/connector-facebook-ads @orchesty/nodejs-sdk
46
+ # or
47
+ pnpm add @orchesty/connector-facebook-ads @orchesty/nodejs-sdk
48
+ ```
49
+
50
+ Register the application and nodes in your Orchesty DI container:
51
+
52
+ ```typescript
53
+ import { container } from '@orchesty/nodejs-sdk';
54
+ import { OAuth2Provider } from '@orchesty/nodejs-sdk/dist/lib/Authorization/Provider/OAuth2/OAuth2Provider';
55
+ import FacebookAdsApplication from '@orchesty/connector-facebook-ads/dist/FacebookAdsApplication';
56
+ import FacebookCreateCampaigns from '@orchesty/connector-facebook-ads/dist/Connector/FacebookCreateCampaigns';
57
+
58
+ const app = new FacebookAdsApplication(container.get(OAuth2Provider));
59
+ container.setApplication(app);
60
+ container.setNode(new FacebookCreateCampaigns(), app);
61
+ ```
62
+
63
+ ## License
64
+
65
+ This connector is released under the **Apache License 2.0**. See the [LICENSE](https://github.com/Orchesty/orchesty-nodejs-connectors/blob/master/LICENSE) file for the full license text.
66
+
67
+ ## Contributing
68
+
69
+ Contributions are welcome! This connector is part of the open-source [Orchesty Node.js Connectors](https://github.com/Orchesty/orchesty-nodejs-connectors) monorepo.
70
+
71
+ For guidelines on how to create or update connectors — including project setup, coding conventions, and how to write tests — please refer to the **[Contributing to Connectors](https://orchesty.io/community/contributing-to-connectors)** guide.
72
+
73
+ All contributions should include:
74
+ - Source code in `src/` following the existing connector structure
75
+ - Tests in `src/**/__tests__/` with `input.json`, `mock.json`, and `output.json` fixtures
76
+ - An updated `CHANGELOG.md` entry
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-facebook-ads",
3
3
  "description": "",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
@@ -17,7 +17,7 @@
17
17
  "keywords": [],
18
18
  "author": "info@hanaboso.com",
19
19
  "dependencies": {
20
- "@orchesty/nodejs-sdk": "^4.3.6"
20
+ "@orchesty/nodejs-sdk": "^5.0.8"
21
21
  },
22
22
  "engines": {
23
23
  "node": ">=24"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orchesty/connector-facebook-ads",
3
3
  "description": "",
4
- "version": "1.0.1",
4
+ "version": "2.0.0",
5
5
  "license": "Apache-2.0",
6
6
  "url": "https://github.com/Orchesty/orchesty-nodejs-connectors",
7
7
  "repository": "https://github.com/Orchesty/orchesty-nodejs-connectors",
@@ -11,7 +11,7 @@
11
11
  "keywords": [],
12
12
  "author": "info@hanaboso.com",
13
13
  "dependencies": {
14
- "@orchesty/nodejs-sdk": "^4.3.6"
14
+ "@orchesty/nodejs-sdk": "^5.0.8"
15
15
  },
16
16
  "engines": {
17
17
  "node": ">=24"