{
  "name": "Facebook token retrieval & management",
  "nodes": [
    {
      "id": "ecd428ff-673c-435c-a6b3-723ae6f3f88d",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        1680,
        280
      ]
    },
    {
      "id": "7fe9fcb7-49f3-4628-8a9f-2027f9dffd61",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        2360,
        280
      ]
    },
    {
      "id": "ded6d8fa-3add-4084-a9f2-172a5d51158b",
      "name": "Short-Lived Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2720,
        140
      ]
    },
    {
      "id": "27fed69c-e476-4e19-870e-f26ed707e36a",
      "name": "Long-Lived Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3000,
        -100
      ]
    },
    {
      "id": "94e38177-b72f-4e99-9e2f-e43bd679589b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1660,
        -800
      ],
      "parameters": {
        "width": 920,
        "height": 900,
        "content": "### Instructions to Get a 2-Month Facebook Token\nRun n8n with tunnel model - Or user: Ngrok, Cloudflare Tunnel\n\n1. **Activate the App**:\n   - Launch the app. In the top-right corner near the **Save** "
      }
    },
    {
      "id": "4af7f1f6-9479-4489-9282-7083cd29649c",
      "name": "Redirect URL",
      "type": "n8n-nodes-base.code",
      "position": [
        2980,
        480
      ]
    },
    {
      "id": "b415e387-17ed-4451-ae7d-b8d1fdf8ee06",
      "name": "Redirect",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3740,
        480
      ]
    },
    {
      "id": "d59290d9-79b5-4212-a8ad-a1a9e074bbf2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1840,
        140
      ],
      "parameters": {
        "width": 420,
        "height": 480,
        "content": "Edit:\n - fb_redirect_uri\n - app_id\n - app_secret\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nGo to the [Facebook App](https://developers.facebook.com/apps/).\n    - Select **Facebook Login** from the left-hand menu.\n    - Click on"
      }
    },
    {
      "id": "952f17fa-efdf-4523-9d9b-ff071670e425",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2460,
        460
      ],
      "parameters": {
        "width": 640,
        "height": 760,
        "content": "\n\n\n\n### Guide to Editing `correctScopes`\n\n1. **Add a Permission**:\n   - Add the permission to the `correctScopes` array. For example:\n     ```javascript\n     const correctScopes = [\n       'pages_mana"
      }
    },
    {
      "id": "dbc712ba-1a95-4041-ac27-824d804726bc",
      "name": "Token",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        3700,
        -100
      ]
    },
    {
      "id": "560d3c3f-a0e8-432e-904f-71cd7525fd0d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3280,
        -180
      ],
      "parameters": {
        "width": 280,
        "height": null,
        "content": "By default, the token will be displayed on the screen. However, you can add a `node` to save the token into your database."
      }
    },
    {
      "id": "99e67d66-5179-4186-b78f-ced80ab5dd82",
      "name": "Config",
      "type": "n8n-nodes-base.set",
      "position": [
        1980,
        280
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Short-Lived Token",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Redirect URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Config",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redirect URL": {
      "main": [
        [
          {
            "node": "Redirect",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Long-Lived Token": {
      "main": [
        [
          {
            "node": "Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Short-Lived Token": {
      "main": [
        [
          {
            "node": "Long-Lived Token",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Redirect URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}