Connectors Reference

Facebook

Facebook API allows you to access and publish posts on your Facebook user account

 

Status: Production

Tier: Standard

Version: 1.0

 

Actions:

Name

Summary

MyTimeline ([Optional]string fields, [advanced][Optional]integer limit, [advanced][Optional]string with, [advanced][Optional]string filter)

Get feed from my timeline

PostToMyTimeline (UserPostFeedRequest post)

Post to my timeline

UserTimeline (string userId, [advanced][Optional]integer limit, [advanced][Optional]string with, [advanced][Optional]string filter, [Optional]string fields)

Get user timeline

PageFeed (string pageId, [advanced][Optional]integer limit, [advanced][Optional]boolean include_hidden, [Optional]string fields)

Get page feed

PostToPage (string pageId, PagePostFeedRequest post)

Post to page

PublishPhoto (PostPhotoRequest photo)

Publish Photo

PublishVideo (PostVideoRequest message)

Publish Video

ReadProfilePicture (string user-id)

Get Profile Picture

ReadEventsFromPage (string page-id)

Get Page Events

 

Triggers:

Name

Summary

TriggerNewPost ()

When there is a new post on my timeline

 

Objects:

Name

Summary

ActionItem

 

AdminItem

 

ChildAttachmentsItem

 

FeedTargetItem

 

GetEventResponse

Event List

GetEventResponseItem

Event

GetFeedResponse

Feed

GetPhotoResponse

 

GetPhotoResponseItem

 

LocationItem

 

PagePostFeedRequest

 

PlaceItem

 

PostFeedResponse

Posted Item

PostItem

Feed Item

PostPhotoRequest

 

PostPhotoResponse

 

PostVideoRequest

 

PrivacyItem

 

ProfileCollection

 

PropertyItem

 

TargetItem

 

TriggerFeedResponse

Timeline Feed

TriggerItem

Feed Item

UserItem

User

UserPostFeedRequest

 

 

Actions:

MyTimeline

Summary: Get feed from my timeline

Description: Gets the feeds from the logged in user's timeline.

 

Syntax:

Facebook.MyTimeline ([Optional]string fields, [advanced][Optional]integer limit, [advanced][Optional]string with, [advanced][Optional]string filter)

 

Parameters:

Name

Type

Summary

Required

Related Action

fields

string

(Fields)

Specify the fields you want returned. Example (id,name,picture).

False

limit

integer(int32)

(Max posts)

Maximum number of posts to be retrieved.

False

with

string

(With or without location)Values: [location]

Restrict the list of posts to only those with location attached.

False

filter

string

(Filter for the feeds returned)Values: [np, app_2915120374, app_2305272732, app_2309869772, pp, app_2392950137, app_2347471856, app_2361831622]

Retrieve only posts that match a particular stream filter.

False

 

Returns:

          Type:GetFeedResponse

          Summary: Feed

          Description: List of feed items.

 

PostToMyTimeline

Summary: Post to my timeline

Description: Post a status message to the logged in user's timeline.

 

Syntax:

Facebook.PostToMyTimeline (UserPostFeedRequest post)

 

Parameters:

Name

Type

Summary

Required

Related Action

post

UserPostFeedRequest

 

 

True

 

Returns:

          Type:PostFeedResponse

          Summary: Posted Item

          Description: Details of the item posted to the feed.

 

UserTimeline

Summary: Get user timeline

Description: Get posts from a user's timeline.

 

Syntax:

Facebook.UserTimeline (string userId, [advanced][Optional]integer limit, [advanced][Optional]string with, [advanced][Optional]string filter, [Optional]string fields)

 

Parameters:

Name

Type

Summary

Required

Related Action

userId

string

(User ID)

Unique ID of the user whose timeline have to be retrieved.

True

limit

integer(int32)

(Max posts)

Maximum number of posts to be retrieved.

False

with

string

(With or without location)Values: [location]

Restrict the list of posts to only those with location attached.

False

filter

string

(Filter for the feeds returned)Values: [np, app_2915120374, app_2305272732, app_2309869772, pp, app_2392950137, app_2347471856, app_2361831622]

Retrieve only posts that match a particular stream filter.

False

fields

string

(Fields)

Specify the fields you want returned. Example (id,name,picture).

False

 

Returns:

          Type:GetFeedResponse

          Summary: Feed

          Description: List of feed items.

 

PageFeed

Summary: Get page feed

Description: Get posts from the feed of a specified page.

 

Syntax:

Facebook.PageFeed (string pageId, [advanced][Optional]integer limit, [advanced][Optional]boolean include_hidden, [Optional]string fields)

 

Parameters:

Name

Type

Summary

Required

Related Action

pageId

string

(Page ID)

Unique ID of the page from which posts have to be retrieved.

True

limit

integer(int32)

(Max posts)

Maximum number of posts to be retrieved.

False

include_hidden

boolean

(Include hidden posts)

Whether or not to include any posts that were hidden by the Page.

False

fields

string

(Fields)

Specify the fields you want returned. Example (id,name,picture).

False

 

Returns:

          Type:GetFeedResponse

          Summary: Feed

          Description: List of feed items.

 

PostToPage

Summary: Post to page

Description: Post a message to a Facebook Page as the logged in user.

 

Syntax:

Facebook.PostToPage (string pageId, PagePostFeedRequest post)

 

Parameters:

Name

Type

Summary

Required

Related Action

pageId

string

(Page ID)

Unique ID of the page to post to.

True

post

PagePostFeedRequest

 

 

True

 

Returns:

          Type:PostFeedResponse

          Summary: Posted Item

          Description: Details of the item posted to the feed.

 

PublishPhoto

Summary: Publish Photo

Description: Publish a photo to the specified Facebook Page or to the User's timeline.

 

Syntax:

Facebook.PublishPhoto (PostPhotoRequest photo)

 

Parameters:

Name

Type

Summary

Required

Related Action

photo

PostPhotoRequest

 

 

True

 

Returns:

          Type:PostPhotoResponse

 

PublishVideo

Summary: Publish Video

Description: Publish a video to the specified Facebook page or to the user's timeline.

 

Syntax:

Facebook.PublishVideo (PostVideoRequest message)

 

Parameters:

Name

Type

Summary

Required

Related Action

message

PostVideoRequest

 

 

True

 

Returns:

          Type:PostFeedResponse

          Summary: Posted Item

          Description: Details of the item posted to the feed.

 

ReadProfilePicture

Summary: Get Profile Picture

Description: Gets the User profile picture

 

Syntax:

Facebook.ReadProfilePicture (string user-id)

 

Parameters:

Name

Type

Summary

Required

Related Action

user-id

string

(User ID)

Unique ID of the user whose profile picture needs to be retrieved. Provide "me" if you want to retrieve your profile picture

True

 

Returns:

          Type:GetPhotoResponse

 

ReadEventsFromPage

Summary: Get Page Events

Description: Gets Events from the specified Facebook Page

 

Syntax:

Facebook.ReadEventsFromPage (string page-id)

 

Parameters:

Name

Type

Summary

Required

Related Action

page-id

string

(Page ID)

Unique ID of the page from which events are to be retrieved.

True

 

Returns:

          Type:GetEventResponse

          Summary: Event List

          Description: A list of one or multiple Facebook events.

 

Triggers:

Trigger TriggerNewPost

Summary: When there is a new post on my timeline

Description: Triggers a new flow when there is a new post on the logged in user's timeline.

 

Syntax:

Facebook.TriggerNewPost ()

 

Returns:

          Type:TriggerFeedResponse

          Summary: Timeline Feed

          Description: List of newly created posts.

 


 

ActionItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

name

string

 

The name or label of the action link.

link

string

 

The URL of the action link itself.


 

AdminItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

integer(int32)

 

Unique ID of the admin user.

name

string

 

Name of the admin.


 

ChildAttachmentsItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

link

string

 

The URL of a link to attach to the post.

picture

string(uri)

 

Determines the preview image associated with the link (1:1 aspect ratio and a minimum of 458 x 458 px for best display).

image_hash

string

 

Hash of a preview image associated with the link from your ad image library (1:1 aspect ratio and a minimum of 458 x 458 px for best display).

name

string

 

The title of the link preview.

description

string

 

Used to show either a price, discount or website domain.


 

FeedTargetItem

Summary:

Description: Object that controls news feed targeting for this post. Anyone in these groups will be more likely to see this post, others will be less likely. Applies to Pages only.

 

          Properties:

Name

Type

Summary

countries

array of (string)

 

Values of targeting countries.

regions

array of (integer(int32))

 

Values for targeted regions.

cities

array of (integer(int32))

 

Values for excluded cities.

age_min

integer(int32)

 

Must be 13 or higher.

age_max

integer(int32)

 

Maximum Age.

genders

array of (integer(int32))

 

Target specific genders. 1 targets all male viewers and 2 females. Default is to target both.

relationship_statuses

array of (integer(int32))

 

Array of integers for targeting based on relationship status.

interested_in

array of (integer(int32))

 

Indicates targeting based on the 'interested in' field of the user profile.

college_years

array of (integer(int32))

 

Array of integers for graduation year from college.

education_statuses

array of (integer(int32))

 

Array of integers for targeting based on education level.

locales

array of (integer(int32))

 

Targeted locales.


 

GetEventResponse

Summary: Event List

Description: A list of one or multiple Facebook events.

 

          Properties:

Name

Type

Summary

data

array of (GetEventResponseItem)

Data

 


 

GetEventResponseItem

Summary: Event

Description: Details about a Facebook event.

 

          Properties:

Name

Type

Summary

id

string

Event ID

Unique identifier of the event

name

string

Event Name

Name of the event.

start_time

string

Start Time

Date-Time the event starts.

end_time

string

End Time

 

timezone

string

Timezone

Date-Time the event ends.

location

string

Location

Event location.

description

string

Description

Verbose description of the event.

ticket_uri

string

Ticket Uri

Web link associated with the Facebook event.

rsvp_status

string

RSVP Status

Your status with respect to the event.


 

GetFeedResponse

Summary: Feed

Description: List of feed items.

 

          Properties:

Name

Type

Summary

data

array of (PostItem)

Response Data

 


 

GetPhotoResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

data

GetPhotoResponseItem

 

 


 

GetPhotoResponseItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

url

string

Photo Url

Link associated with the Facebook photo.

is_silhouette

boolean

Is Silhoutte?

True if the photo is a silhoutte.

height

string

Height

Size of the photo.

width

string

Width

Size of the photo.


 

LocationItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

city

string

 

City of the location.

country

string

 

Country of the location.

latitude

number(float)

 

Latitude of the location.

located_in

string

 

The parent location if this location is located within another location.

longitude

number(float)

 

Longitude of the location.

name

string

 

Name of the location.

region

string

 

Name of the location region.

state

string

 

State which the location is in.

street

string

 

Street which the location is on.

zip

string

 

Location Zip Code.


 

PagePostFeedRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary

message

string

 

The main body of the post, otherwise called the status message.

link

string(uri)

 

The URL of a link to attach to the post.

picture

string(uri)

 

Determines the preview image associated with the link.

name

string

 

Overwrites the title of the link preview.

caption

string

 

Overwrites the caption under the title in the link preview.

description

string

 

Overwrites the description in the link preview.

actions

array of (ActionItem)

 

The action links attached to the post.

place

string

 

Page ID of a location associated with this post

tags

string

 

Comma-separated list of user IDs of people tagged in this post.

object_attachment

string

 

Facebook ID for an existing picture in the person's photo albums to use as the thumbnail image.

targeting

TargetItem

 

 

feed_targeting

FeedTargetItem

 

Object that controls news feed targeting for this post. Anyone in these groups will be more likely to see this post, others will be less likely. Applies to Pages only.

published

boolean

 

Whether a story is shown about this newly published object.

scheduled_publish_time

string(date-time)

 

Time when this post should go live, this can be any date between ten minutes and six months from the time of the API call.

backdated_time

string(date-time)

 

Specifies a time in the past to back-date this post to.

backdated_time_granularity

string

 

Controls the display of how a backdated post appears.  Values: [year, month, day, hour, minute]

child_attachments

array of (ChildAttachmentsItem)

 

Use to specify multiple links in the post.

multi_share_end_card

boolean

 

If set to false, does not display the end card of a carousel link post when child_attachments is used.


 

PlaceItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

string

 

Unique ID of the place

name

string

 

Name of the place

overall_rating

number(float)

 

Overall rating of place, on a 5-star scale. 0 means not enough data to get a combined rating.

location

LocationItem

 

 


 

PostFeedResponse

Summary: Posted Item

Description: Details of the item posted to the feed.

 

          Properties:

Name

Type

Summary

id

string

 

 


 

PostItem

Summary: Feed Item

Description: An individual entry in a profile's feed. The profile could be a user, page, app, or group.

 

          Properties:

Name

Type

Summary

id

string

 

Unique ID of the post.

admin_creator

array of (AdminItem)

 

Unique ID of admin who created the post. Applies to pages only.

caption

string

 

The caption of a link in the post (appears beneath the name).

created_time

string(date-time)

 

The time the post was initially published. For a post about a life event, this will be the date and time of the life event.

description

string

 

A description of a link in the post (appears beneath the caption).

feed_targeting

FeedTargetItem

 

Object that controls news feed targeting for this post. Anyone in these groups will be more likely to see this post, others will be less likely. Applies to Pages only.

from

UserItem

User

Details of a specific Facebook user.

icon

string

 

A link to an icon representing the type of this post.

is_hidden

boolean

 

If this post is marked as hidden (applies to Pages only).

is_published

boolean

 

Indicates whether a scheduled post was published (applies to scheduled Page Post only, for users post and instanlty published posts this value is always true).

link

string(uri)

 

The link attached to this post.

message

string

 

The status message in the post.

name

string

 

The name of the link.

object_id

string

 

The ID of any uploaded photo or video attached to the post.

picture

string(uri)

 

The picture scraped from any link included with the post.

place

PlaceItem

 

 

privacy

PrivacyItem

 

 

properties

array of (PropertyItem)

 

A list of properties for any attached video, for example, the length of the video.

source

string(uri)

 

A URL to any Flash movie or video file attached to the post.

status_type

string

 

Description of the type of a status update.  Values: [mobile_status_update, created_note, added_photos, added_video, shared_story, created_group, created_event, wall_post, app_created_story, published_story, tagged_in_photo, approved_friend]

story

string

 

Text from stories not intentionally generated by users, such as those generated when two people become friends, or when someone else posts on the person's wall.

targeting

TargetItem

 

 

to

array of (ProfileCollection)

 

Profiles mentioned or targeted in this post.

type

string

 

A string indicating the object type of this post.  Values: [link, status, photo, video, offer]

updated_time

string(date-time)

 

The time of the last change to this post, or the comments on it.

with_tags

ProfileCollection

 

 

media

array of (string(uri))

 

 


 

PostPhotoRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary

url

string

Image Url

The url for the image.

caption

string

Caption

Caption of the image.


 

PostPhotoResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary

id

string

Id

Unique identifier of the Facebook photo.

post_id

string

Post ID

Unique identifier of the Facebook post.


 

PostVideoRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary

videoData

string

Video

Base-64 encoded string representing a video.

description

string

Video Description

Description of the video.

title

string

Video Title

Title of the video.

uploadedVideoName

string

Video Name

Name of the video.


 

PrivacyItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

description

string

 

Text that describes the privacy settings, as they would appear in Facebook.

value

string

 

The value of the privacy setting.  Values: [EVERYONE, ALL_FRIENDS, FRIENDS_OF_FRIENDS, SELF, CUSTOM]

allow

string

 

When value is CUSTOM, this is a comma-separated list of user IDs and friend list IDs that can see the post.

deny

string

 

When value is CUSTOM, this is a comma-separated list of user IDs and friend list IDs that cannot see the post.

friends

string

 

When value is CUSTOM, this indicates which group of friends can see the post.  Values: [ALL_FRIENDS, FRIENDS_OF_FRIENDS, SOME_FRIENDS]


 

ProfileCollection

Summary:

Description:

 

          Properties:

Name

Type

Summary

data

array of (UserItem)

 

 


 

PropertyItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

name

string

 

The property name.

text

string

 

The value of the property.

href

string(uri)

 

Any link associated with the property.


 

TargetItem

Summary:

Description:

 

          Properties:

Name

Type

Summary

countries

array of (string)

 

Values of targeting countries.

locales

array of (integer(int32))

 

Targeted locales.

regions

array of (integer(int32))

 

Values for targeted regions.

cities

array of (integer(int32))

 

Values for excluded cities.


 

TriggerFeedResponse

Summary: Timeline Feed

Description: List of newly created posts.

 

          Properties:

Name

Type

Summary

data

array of (TriggerItem)

Response Data

 


 

TriggerItem

Summary: Feed Item

Description: An individual entry in a profile's feed. The profile could be a user, page, app, or group.

 

          Properties:

Name

Type

Summary

id

string

 

The post ID.

created_time

string(date-time)

 

The time the post was initially published. For a post about a life event, this will be the date and time of the life event.

from

UserItem

User

Details of a specific Facebook user.

message

string

 

The status message in the post.

type

string

 

A string indicating the object type of this post.  Values: [link, status, photo, video, offer]

picture

string(uri)

 

The picture scraped from any link included with the post.

link

string(uri)

 

The link attached to this post.

name

string

 

The name of the link.

description

string

 

A description of a link in the post (appears beneath the caption).

media

array of (string(uri))

 

 


 

UserItem

Summary: User

Description: Details of a specific Facebook user.

 

          Properties:

Name

Type

Summary

id

string

 

Unique ID of the user.

first_name

string

 

User first name.

last_name

string

 

User last name.

name

string

 

User full name.

gender

string

 

Gender of the user.

about

string

 

Body of the user's bio page.


 

UserPostFeedRequest

Summary:

Description:

 

          Properties:

Name

Type

Summary

message

string

 

The main body of the post, otherwise called the status message.

link

string(uri)

 

The URL of a link to attach to the post.

picture

string(uri)

 

Determines the preview image associated with the link.

name

string

 

Overwrites the title of the link preview.

caption

string

 

Overwrites the caption under the title in the link preview.

description

string

 

Overwrites the description in the link preview.

place

string

 

Page ID of a location associated with this post.

tags

string

 

Comma-separated list of user IDs of people tagged in this post.

privacy

PrivacyItem

 

 

object_attachment

string

 

Facebook ID for an existing picture in the person's photo albums to use as the thumbnail image.