UNPKG

@yaring/n8n-nodes-meta

Version:

N8N node for publishing content to Facebook, Instagram, and Threads with access token authentication. Supports text posts, photos, videos, Reels, carousels, and stories.

59 lines 2.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.FacebookInstagramThreadsApi = void 0; class FacebookInstagramThreadsApi { constructor() { this.name = 'facebookInstagramThreadsApi'; this.displayName = 'Facebook, Instagram & Threads API'; this.documentationUrl = 'https://developers.facebook.com/docs/graph-api/overview'; this.properties = [ { displayName: 'Access Token', name: 'accessToken', type: 'string', typeOptions: { password: true, }, required: true, default: '', description: 'The access token for Facebook, Instagram, and Threads APIs. You can generate it from Facebook Graph API Explorer or your app dashboard.', }, { displayName: 'API Version', name: 'apiVersion', type: 'string', default: 'v23.0', description: 'Facebook Graph API version to use (default: v23.0)', }, ]; this.authenticate = { type: 'generic', properties: { qs: { access_token: '={{$credentials.accessToken}}', }, }, }; this.test = { request: { baseURL: '={{`https://graph.facebook.com/${$credentials.apiVersion || "v23.0"}`}}', url: '/me', qs: { fields: 'id,name,email', }, }, rules: [ { type: 'responseSuccessBody', properties: { key: 'id', value: undefined, message: 'Invalid access token or insufficient permissions', }, }, ], }; } } exports.FacebookInstagramThreadsApi = FacebookInstagramThreadsApi; //# sourceMappingURL=FacebookInstagramThreadsApi.credentials.js.map