ProtectedapiGet the API base URL for the platform
ProtectedapiAPI version for cleaner URL building
ProtectedaxiosGet or create axios instance with interceptors
ProtectedcommonCommon parameters for all social media actions
Get action description
ProtectedoauthOAuth-specific parameters that all OAuth actions should include
Define the parameters for this action
ProtectedplatformGet the platform name (e.g., 'Twitter', 'LinkedIn')
ProtectedbuildBuild common API headers including authentication
OptionaladditionalHeaders: Record<string, string>ProtectedcreateCreate a post on Facebook
ProtectedformatFormat date for API requests (ISO 8601)
ProtectedgetGet the current access token
ProtectedgetGet custom attributes from company integration
ProtectedgetGet page access token for a specific page
ProtectedgetGet posts from a page
ProtectedgetProtectedgetHelper to get parameter value from params array
ProtectedgetProtectedgetGet default fields for post queries
ProtectedgetGet profile ID from parameters or default from integration
ProtectedgetGet the refresh token
ProtectedgetGet the authenticated user's pages
ProtectedhandleHandle Facebook-specific errors
ProtectedhandleProtectedhandleHandle rate limiting with exponential backoff
OptionalretryAfter: numberProtectedinitializeInitialize OAuth connection by loading integration details.
the MJ Company Integration ID to load
Optionalparams: RunActionParamsthe running action's params; params.Provider is captured so all
subsequent entity loads/saves bind to the per-request provider (multi-tenant
correctness). When omitted, falls back to the global default Metadata provider.
ProtectedInternalProtectedisDetermine if an error is an authentication error. Can be overridden by subclasses for platform-specific error detection.
ProtectedisCheck if the current token is expired
ProtectedlogLog API request for debugging
Optionaldata: anyProtectedlogLog API response for debugging
ProtectedmakeProtectednormalizeProtectednormalizeProtectedparseParse date from API response
ProtectedparseParse Facebook-specific rate limit headers
ProtectedrefreshRefresh the access token using the refresh token Note: Facebook uses long-lived tokens that last 60 days
Executes the action with the provided parameters.
The action execution parameters including context
Promise resolving to the action result
ProtectedsearchSearch for posts - implemented in search action
ProtectedsetSet custom attributes in company integration
ProtectedupdateUpdate stored tokens after refresh
OptionalrefreshToken: stringOptionalexpiresIn: numberProtecteduploadProtecteduploadProtecteduploadProtectedvalidate
Retrieves detailed insights and analytics for a specific Facebook post. Provides metrics like reach, impressions, engagement, and more.