Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
  • Facebook Login
  • Open Graph
  • Facebook APIs
    • Graph API
    • FQL
    • Open Graph
    • Dialogs
    • Chat
    • Internationalization
    • Ads
  • Games
  • Media
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • Web
  • Technology Partners
  • Tables
    • album
    • app_role
    • application
    • apprequest
    • checkin
    • comment
    • comments_info
    • connection
    • cookies
    • column
    • developer
    • domain
    • domain_admin
    • event
    • event_member
    • family
    • friend
    • friendlist
    • friendlist_member
    • friend_request
    • group
    • group_member
    • insights
    • like
    • link
    • link_image_src
    • link_stat
    • location_post
    • mailbox_folder
    • message
    • note
    • notification
    • object_url
    • page
    • page_admin
    • page_blocked_user
    • page_global_brand_child
    • page_fan
    • page_milestone
    • permissions
    • permissions_info
    • photo
    • photo_src
    • photo_tag
    • place
    • privacy
    • privacy_setting
    • profile
    • profile_tab
    • profile_view
    • question
    • question_option
    • question_option_votes
    • review
    • score
    • standard_friend_info
    • standard_user_info
    • status
    • stream
    • stream_filter
    • stream_tag
    • subscription
    • table
    • thread
    • translation
    • unified_message
    • unified_message_count
    • unified_message_sync
    • unified_thread
    • unified_thread_action
    • unified_thread_count
    • unified_thread_sync
    • url_like
    • user
    • video
    • video_tag

stream

API Reference › FQL › stream

Description

An FQL table that can be used to return a list of a stream posts.

Columns

NameDescription

action_links

array

An array containing the text and URL for each action link

actor_id

(id) or (unsigned int32)

The ID of the user, page, group, or event that published the post

app_data

struct

An array of app-specific information optionally supplied to create the attachment to the post

tbid

number

Template bundle ID for the post

attachment_data

string

Attachment data associated with the post

images

string

Images associated with the post

photo_ids

array

Photo IDs associated with the post

app_id

id

For posts published by apps, the ID of that app. If the value is empty, it indicates a Facebook feature generated the post

attachment

struct

An array of information about the attachment to the post

media

array

Rich media that provides visual content for the post

name

string

The title of the post

href

string

The URL of the attachment

caption

string

A subtitle for the post

description

string

Descriptive text about the story

properties

array

A dictionary of key/value pairs that provide more information about the post

icon

string

The icon for the attachment

fb_object_type

string

Object type of the attachment

fb_object_id

string

Object ID of the attachmenet

fb_checkin

struct

A checkin object

checkin_id

id

The ID of the checkin

author_uid

id

The ID of the user making the checkin

page_id

id

The ID of the Page representing the place

target_id

id

The ID of Event or Page the user is checking into

target_href

string

The URL of the Event or Page the user is checking into

coords

struct

The latitude and longitude of the location

latitude

float (min: -90) (max: 90)

A float, in decimal degrees, describing the latitude. Minumum is -90.0, maximum is 90.0.

longitude

float (min: -180) (max: 180)

A float, in decimal, describing the longitude. Minumum is -180.0, maximum is 180.0.

altitude

float

A float, in meters, describing the altitude.

accuracy

float

A float, in meters, describing the accuracy.

altitudeAccuracy

float

A float describing the accuracy of the altitude.

heading

float

A double or null, in degrees, describing the heading direction calculated based on previous position.

speed

float

A double or null, in meters/second, describing the speed calculated based on previous position.

timestamp

timestamp

A UNIX timestamp for the time of the request

tagged_uids

array

The IDs of users tagged in the checkin

timestamp

timestamp

A UNIX timestamp of the checkin

message

string

The message the author posted with the checkin

target_type

string

The type of the target for the checkin. For example,event and page

sticker_id

numeric string

The ID of the sticker within the attachment

tagged_ids

array

Tagged user IDs

attribution

string

For posts published by apps, the full name of that app

claim_count

unsigned int32

Count for how many people claimed the offer

comment_info

struct

Information about the comments left on this post

can_comment

bool

Whether the comments are allowed on the object

comment_count

unsigned int32

The number of comments on this object.

comment_order

enum

The order that these comments are displayed on site.

created_time

timestamp

The time the post was published, expressed as UNIX timestamp

description

string

Text of stories not intentionally generated by users, such as those generated when two users become friends. You must have the "Include recent activity stories" migration enabled in your app to retrieve this field

description_tags

array

The list of tags in the post description

expiration_timestamp

string

UNIX timestamp of when the offer expires

feed_targeting

struct

Feed targeting information

country

array

Targeting country

cities

array

Targeting cities

regions

array

Targeting regions

zips

array

Targeting locations' zip codes

genders

array

Targeting genders

college_networks

array

Targeting college networks

work_networks

array

Targeting work networks

age_min

(number) or (numeric string)

Targeting user minimum age

age_max

(number) or (numeric string)

Targeting user maximum age

education_statuses

array

Targeting user education statuses

college_years

array

Targeting user year in college

college_majors

array

Targeting user college majors

political_views

array

Targeting user political views

relationship_statuses

array

Targeting relationship statuses

keywords

array

Targeting keywords

interested_in

array

Targeting user interests

user_clusters

array

Targeting user cluster

user_clusters2

array

Second targeting user cluster

user_clusters3

array

Third targeting user cluster

user_adclusters

array

Targeting user ad clusters

excluded_user_adclusters

array

Excluded user ad clusters

custom_audiences

array

Custom list of users to target to

excluded_custom_audiences

array

Custom list of users to exclude targeting to

retargeting_audiences

array

List of users to retarget to

excluded_retargeting_audiences

array

List of users to exclude retargeting to

locales

array

Targeting user locales

radius

numeric string

Targeting user located within a radius of the location

connections

array

Targeting connections

excluded_connections

array

Connections to exclude targeting to

friends_of_connections

array

Friends of connections to target to

countries

array

Targeting countries

excluded_user_clusters

array

User clusters to exclude targeting to

adgroup_id

(number) or (numeric string)

ID of the ad group

user_event

array

User event

qrt_versions

array

Targeting QRT versions

page_types

array

Types of the pages to target to

app_types

array

Types of apps to target to

broad_age

(number) or (numeric string)

Whether or not to enable "broad-age-match" targeting. The default is 0 (disabled). Set to 1 to enable broad-age-match targeting

action_spec

string

See the documentation page Action Spec Targeting for more details

action_spec_friend

string

See the documentation page Action Spec Targeting for more details

action_spec_excluded

string

See the documentation page Action Spec Targeting for more details

context

array

Additional list of codes

filter_key

string

The filter key to fetch data with. This key should be retrieved by querying the stream_filter FQL table or with the special values 'others' or 'owner'.

impressions

unsigned int32

Number of impressions of this post. This data is visible only if you have read_insights permission from a page owner

is_exportable

number (min: 0) (max: 1)

Whether the post is exportable

is_hidden

bool

Whether a post has been set to hidden

is_published

bool

Whether the post is published

likes

struct

An array containing likes information

href

string

URL of the liked post

count

number

The total number of likes

sample

array

List of sample user IDs as who liked the post

friends

array

List of friends' user IDs who liked the post

user_likes

bool

Whether the user has liked this post

can_like

bool

Whether the user is able to like this post

message

string

The message written in the post

message_tags

array

The list of tags in the post message

parent_post_id

string

ID of the parent post

permalink

string

The URL of the post

place

id

ID of the place associated with the post

post_id

string

The ID of the post

privacy

struct

The privacy settings for a post

description

string

A description of the privacy settings. For custom settings, it can contain names of users, networks, and friend lists.

value

string

The privacy value for the object, one of: EVERYONE, CUSTOM, ALL_FRIENDS, NETWORKS_FRIENDS, FRIENDS_OF_FRIENDS, SELF.

friends

string

Which users can see the object. Can be one of: EVERYONE, NETWORKS_FRIENDS, FRIENDS_OF_FRIENDS, ALL_FRIENDS, SOME_FRIENDS, SELF, NO_FRIENDS.

networks

string

The ID of the network that can see the object, or 1 for all of the user's networks.

allow

string

The UIDs of the specific users or the IDs of friendlists that can see the object (as a comma-separated string).

deny

string

The UIDs of the specific users or the IDs of friendlists that cannot see the object (as a comma-separated string).

promotion_status

string

Status of the promotion, if the post was promoted

scheduled_publish_time

timestamp

UNIX timestamp of the scheduled publish time for the post

share_count

unsigned int32

Number of times the post has been shared

source_id

id

The ID of the user, page, group, or event whose wall the post is on

subscribed

bool

Whether user is subscribed to the post

tagged_ids

array

An array of IDs tagged in the message of the post.

target_id

id

The user, page, group, or event to whom the post was directed

targeting

struct

Ads targeting information of the post

country

array

Targeting country

cities

array

Targeting cities

regions

array

Targeting regions

zips

array

Targeting locations' zip codes

genders

array

Targeting genders

college_networks

array

Targeting college networks

work_networks

array

Targeting work networks

age_min

(number) or (numeric string)

Targeting user minimum age

age_max

(number) or (numeric string)

Targeting user maximum age

education_statuses

array

Targeting user education statuses

college_years

array

Targeting user year in college

college_majors

array

Targeting user college majors

political_views

array

Targeting user political views

relationship_statuses

array

Targeting relationship statuses

keywords

array

Targeting keywords

interested_in

array

Targeting user interests

user_clusters

array

Targeting user cluster

user_clusters2

array

Second targeting user cluster

user_clusters3

array

Third targeting user cluster

user_adclusters

array

Targeting user ad clusters

excluded_user_adclusters

array

Excluded user ad clusters

custom_audiences

array

Custom list of users to target to

excluded_custom_audiences

array

Custom list of users to exclude targeting to

retargeting_audiences

array

List of users to retarget to

excluded_retargeting_audiences

array

List of users to exclude retargeting to

locales

array

Targeting user locales

radius

numeric string

Targeting user located within a radius of the location

connections

array

Targeting connections

excluded_connections

array

Connections to exclude targeting to

friends_of_connections

array

Friends of connections to target to

countries

array

Targeting countries

excluded_user_clusters

array

User clusters to exclude targeting to

adgroup_id

(number) or (numeric string)

ID of the ad group

user_event

array

User event

qrt_versions

array

Targeting QRT versions

page_types

array

Types of the pages to target to

app_types

array

Types of apps to target to

broad_age

(number) or (numeric string)

Whether or not to enable "broad-age-match" targeting. The default is 0 (disabled). Set to 1 to enable broad-age-match targeting

action_spec

string

See the documentation page Action Spec Targeting for more details

action_spec_friend

string

See the documentation page Action Spec Targeting for more details

action_spec_excluded

string

See the documentation page Action Spec Targeting for more details

context

array

Additional list of codes

timeline_visibility

string

Timeline visibility information of the post

type

int32

The type of this story. Possible values are:

  • 11 - Group created
  • 12 - Event created
  • 46 - Status update
  • 56 - Post on wall from another user
  • 66 - Note created
  • 80 - Link posted
  • 128 -Video posted
  • 247 - Photos posted
  • 237 - App story
  • 257 - Comment created
  • 272 - App story
  • 285 - Checkin to a place
  • 308 - Post in Group

updated_time

timestamp

The time the post was last updated, which occurs when a user comments on the post, expressed as a UNIX timestamp

via_id

numeric string

ID of the user or Page the post was shared from

viewer_id

id

The ID of the current session user

with_location

bool

Whether there is a location associated with the post

with_tags

array

An array of IDs of entities (e.g. users) tagged in this post

xid

string

When querying for the feed of a live stream box, this is the xid associated with the Live Stream box (you can provide 'default' if one is not available)

Examples

  • SELECT ... FROM stream WHERE post_id = A
  • SELECT ... FROM stream WHERE source_id = A
  • SELECT ... FROM stream WHERE filter_key = A
  • SELECT ... FROM stream WHERE xid = A
Note: Additional filters on other columns can be specified but they may make the query less efficient.

Permissions

To read the stream table you need

  • read_stream permissions for all posts that the current session user is able to view
  • read_insights permissions to see post impressions for any posts made by a Page owned by the current session user
Facebook © 2013 · English (US)
AboutAdvertisingCareersPlatform PoliciesPrivacy Policy