Actions7
- Auth Actions
- Thread Actions
Overview
This node interacts with the Facebook Threads API, specifically providing functionality to obtain a long-lived access token from a short-lived one under the "Auth" resource. This operation is useful for extending the validity of Facebook API tokens, which typically expire quickly when short-lived. By converting to a long-lived token, users can maintain persistent access without frequent re-authentication.
Common scenarios include:
- Automating social media workflows where continuous access to Facebook APIs is required.
- Integrating Facebook app authentication into broader automation pipelines.
- Refreshing tokens programmatically to avoid manual intervention.
Practical example:
- A user has a short-lived Facebook access token obtained via OAuth login and wants to convert it to a long-lived token to schedule posts or fetch data over an extended period without re-authenticating.
Properties
| Name | Meaning |
|---|---|
| App ID | The App ID of your Meta/Facebook application. |
| App Secret | The App Secret key associated with your Meta/Facebook application. |
| Short-Lived Access Token | The short-lived access token that you want to exchange for a long-lived access token. |
Output
The output JSON contains the response from the Facebook Graph API endpoint /oauth/access_token with the exchanged long-lived access token details. Typically, this includes fields such as:
access_token: The new long-lived access token string.token_type: The type of token returned (usually "bearer").expires_in: The lifetime of the token in seconds.
This output allows subsequent nodes or workflows to use the long-lived token for authenticated requests to Facebook APIs.
Dependencies
- Requires an active internet connection to call the Facebook Graph API.
- Needs valid credentials: App ID and App Secret from a registered Facebook application.
- Requires a valid short-lived access token obtained previously through Facebook's OAuth process.
- No additional environment variables are needed beyond these inputs.
Troubleshooting
- Invalid App ID or App Secret: Ensure that the App ID and App Secret are correctly copied from your Facebook developer console. Incorrect values will cause authentication failures.
- Expired or Invalid Short-Lived Token: The short-lived token must be valid and not expired; otherwise, the exchange will fail.
- API Request Failures: Network issues or Facebook API downtime can cause errors. Check connectivity and Facebook status.
- Error Messages: If the node throws an error like "Request failed" or "Invalid OAuth access token," verify all input parameters and token validity.
- Continue on Fail: If enabled, the node will return error messages in the output array instead of stopping execution, useful for batch processing.