Facebook

Learn how to use Facebook with Composio

Overview

Enum

FACEBOOK

Description

Facebook is a social media and advertising platform used by individuals and businesses to connect, share content, and promote products or services

Authentication Details

client_id
stringRequired
client_secret
stringRequired
base_url
stringRequired
oauth_redirect_uri
string
scopes
string
access_token
string

Actions

Adds photos to an existing facebook album. note: currently adds one photo at a time. for true batch upload, use facebook's batch api endpoint directly.

Action Parameters

album_id
stringRequired
photo_urls
array
photos
array
published
booleanDefaults to True

Action Response

data
object
error
string
successful
boolean
Adds a specific reaction (like, love, wow, etc.) to a facebook post or comment.

Action Parameters

object_id
stringRequired
type
stringDefaults to LIKE

Action Response

data
object
error
string
successful
boolean
Assigns tasks/roles to a user for a specific facebook page.

Action Parameters

page_id
stringRequired
tasks
arrayRequired
user
stringRequired

Action Response

data
object
error
string
successful
boolean
Creates a comment on a facebook post or replies to an existing comment.

Action Parameters

attachment_id
string
attachment_share_url
string
attachment_url
string
message
stringRequired
object_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Creates a new photo album on a facebook page.

Action Parameters

location
string
message
string
name
stringRequired
page_id
stringRequired
privacy
object

Action Response

data
object
error
string
successful
boolean
Creates a photo post on a facebook page.

Action Parameters

backdated_time
integer
backdated_time_granularity
string
message
string
page_id
stringRequired
photo
object
published
booleanDefaults to True
scheduled_publish_time
integer
url
string

Action Response

data
object
error
string
successful
boolean
Creates a new post on a facebook page.

Action Parameters

link
string
message
stringRequired
page_id
stringRequired
published
booleanDefaults to True
scheduled_publish_time
integer
targeting
object

Action Response

data
object
error
string
successful
boolean
Creates a video post on a facebook page.

Action Parameters

description
string
file_url
string
page_id
stringRequired
published
booleanDefaults to True
scheduled_publish_time
integer
targeting
object
title
string
video
object

Action Response

data
object
error
string
successful
boolean
Deletes a facebook comment.

Action Parameters

comment_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Deletes a facebook page post.

Action Parameters

post_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves details of a specific facebook comment.

Action Parameters

comment_id
stringRequired
fields
stringDefaults to id,message,created_time,from,attachment,comment_count,like_count,is_hidden,parent

Action Response

data
object
error
string
successful
boolean
Retrieves comments from a facebook post or comment (for replies).

Action Parameters

fields
stringDefaults to id,message,created_time,from,attachment,comment_count,like_count,is_hidden
filter
string
limit
integerDefaults to 25
object_id
stringRequired
order
string

Action Response

data
object
error
string
successful
boolean
Retrieves messages from a specific conversation.

Action Parameters

conversation_id
stringRequired
fields
stringDefaults to messages{id,created_time,from,to,message}
limit
integerDefaults to 25

Action Response

data
object
error
string
successful
boolean
Retrieves details of a specific message sent or received by the page.

Action Parameters

fields
stringDefaults to id,created_time,from,to,message
message_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves a list of conversations between users and the page.

Action Parameters

fields
stringDefaults to participants,updated_time,id
limit
integerDefaults to 25
page_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Fetches details about a specific facebook page.

Action Parameters

fields
stringDefaults to id,name,about,category,description,fan_count,followers_count,website
page_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves analytics and insights for a facebook page.

Action Parameters

metrics
stringDefaults to page_impressions,page_engaged_users,page_fans,page_fan_adds,page_fan_removes,page_views_total,page_posts_impressions,page_actions_post_reactions_total
page_id
stringRequired
period
stringDefaults to day
since
string
until
string

Action Response

data
object
error
string
successful
boolean
Retrieves photos from a facebook page.

Action Parameters

fields
stringDefaults to id,created_time,name,picture,source,album,height,width,link
limit
integerDefaults to 25
page_id
stringRequired
type
string

Action Response

data
object
error
string
successful
boolean
Retrieves posts from a facebook page.

Action Parameters

fields
stringDefaults to id,message,created_time,updated_time,permalink_url,attachments
limit
integerDefaults to 25
page_id
stringRequired
since
string
until
string

Action Response

data
object
error
string
successful
boolean
Retrieves a list of people and their tasks/roles on a facebook page.

Action Parameters

page_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves videos from a facebook page.

Action Parameters

fields
stringDefaults to id,created_time,description,title,length,source,picture,views,likes.summary(true)
limit
integerDefaults to 25
page_id
stringRequired
type
string

Action Response

data
object
error
string
successful
boolean
Retrieves details of a specific facebook post.

Action Parameters

fields
stringDefaults to id,message,created_time,updated_time,permalink_url,from,attachments,likes.summary(true),shares
post_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves analytics and insights for a specific facebook post.

Action Parameters

metrics
stringDefaults to post_impressions,post_engaged_users,post_clicks,post_reactions_by_type_total,post_engaged_fan,post_video_views,post_video_avg_time_watched
period
string
post_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves reactions (like, love, wow, etc.) for a facebook post.

Action Parameters

limit
integerDefaults to 25
post_id
stringRequired
summary
booleanDefaults to True
type
string

Action Response

data
object
error
string
successful
boolean
Retrieves scheduled and unpublished posts for a facebook page.

Action Parameters

fields
stringDefaults to id,message,created_time,scheduled_publish_time,is_published
limit
integerDefaults to 25
page_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Retrieves a list of pages the user manages, including tasks and access tokens.

Action Parameters

fields
stringDefaults to id,name,access_token,tasks
user_id
stringDefaults to me

Action Response

data
object
error
string
successful
boolean
Likes a facebook post or comment.

Action Parameters

object_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Marks a user's message as seen by the page.

Action Parameters

page_id
stringRequired
recipient_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Publishes a previously scheduled or unpublished facebook post immediately.

Action Parameters

post_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Removes a user's tasks/access from a specific facebook page.

Action Parameters

page_id
stringRequired
user
stringRequired

Action Response

data
object
error
string
successful
boolean
Changes the scheduled publish time of an unpublished facebook post.

Action Parameters

post_id
stringRequired
scheduled_publish_time
integerRequired

Action Response

data
object
error
string
successful
boolean
Sends a media message (image, video, audio, or file) from the page to a user.

Action Parameters

is_reusable
boolean
media_type
stringRequired
media_url
stringRequired
messaging_type
stringDefaults to RESPONSE
page_id
stringRequired
recipient_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Sends a text message from the page to a user via messenger.

Action Parameters

message_text
stringRequired
messaging_type
stringDefaults to RESPONSE
page_id
stringRequired
recipient_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Shows or hides the typing indicator for a user in messenger.

Action Parameters

page_id
stringRequired
recipient_id
stringRequired
typing_on
booleanRequired

Action Response

data
object
error
string
successful
boolean
Removes a like from a facebook post or comment.

Action Parameters

object_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Updates an existing facebook comment.

Action Parameters

comment_id
stringRequired
is_hidden
boolean
message
stringRequired

Action Response

data
object
error
string
successful
boolean
Updates settings for a specific facebook page.

Action Parameters

about
string
description
string
emails
array
general_info
string
page_id
stringRequired
phone
string
website
string

Action Response

data
object
error
string
successful
boolean
Updates an existing facebook page post.

Action Parameters

message
string
og_action_type_id
string
og_icon_id
string
og_object_id
string
og_phrase
string
og_suggestion_mechanism
string
post_id
stringRequired

Action Response

data
object
error
string
successful
boolean
Uploads a photo file directly to a facebook page. supports local file upload up to 10mb.

Action Parameters

caption
string
page_id
stringRequired
photo
object
published
booleanDefaults to True
scheduled_publish_time
integer
tags
array
targeting
object
url
string

Action Response

data
object
error
string
successful
boolean
Uploads multiple photo files in batch to a facebook page or album. uses facebook's batch api for efficient multi-photo upload. maximum 50 photos per batch.

Action Parameters

album_id
string
page_id
stringRequired
photo_urls
array
photos
array
published
booleanDefaults to True

Action Response

data
object
error
string
successful
boolean
Uploads a video file directly to a facebook page. supports local file upload. for large videos (>100mb), uses resumable upload.

Action Parameters

content_tags
array
custom_labels
array
description
string
page_id
stringRequired
published
booleanDefaults to True
scheduled_publish_time
integer
targeting
object
title
string
video
objectRequired

Action Response

data
object
error
string
successful
boolean