Facebook Graph API

The Facebook Graph API is the primary way to get data into and out of the Facebook platform. It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks.

Active

Capabilities (22)

Get User Posts

Returns a list of posts made by the current user This endpoint retrieves data at /me/posts. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

get_user_posts(after?, before?, fields?, limit?) -> {data, paging}
Required scopes:
public_profile

Delete Live Video

Delete a live video broadcast This endpoint modifies data at /{live-video-id}. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

delete_live_video(live-video-id) -> {success}
Destructive
Required scopes:
publish_to_groups

Unlike Object

Remove a like from a post, comment, or other likeable object This endpoint modifies data at /{object-id}/likes. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

unlike_object(object-id) -> {success}
Destructive
Required scopes:
publish_to_groups

Get Page Live Videos

Get live videos on a Facebook Page This endpoint retrieves data at /{page-id}/live_videos. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

get_page_live_videos(page-id, broadcast_status?, fields?, limit?) -> {data, paging}
Required scopes:
pages_read_engagement

Upload Page Video

Upload a video to a Facebook Page This endpoint modifies data at /{page-id}/videos. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

upload_page_video(page-id) -> {id}
Required scopes:
pages_manage_posts

Check Friendship

Check if two users are friends This endpoint retrieves data at /{user-id}/friends/{user-b-id}. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

check_friendship(user-b-id, user-id) -> {data}
Required scopes:
public_profile

Check Page Like

Check if a user likes a specific Page This endpoint retrieves data at /{user-id}/likes/{page-id}. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

check_page_like(page-id, user-id) -> {data}
Required scopes:
pages_read_engagement

Comment on Object

Post a comment on an object This endpoint modifies data at /{object-id}/comments. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

post_comment(object-id, attachment_id?, attachment_url?, message?) -> {id}
Required scopes:
publish_to_groups

Upload Page Photo

Upload a photo to a Page This endpoint modifies data at /{page-id}/photos. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

upload_page_photo(page-id) -> {id, post_id}
Required scopes:
pages_manage_posts

Create Photo Album

Create a new photo album for the user This endpoint modifies data at /{user-id}/albums. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

create_user_album(name, user-id, message?, privacy?) -> {id}
Required scopes:
publish_to_groups

Get User Photos

Returns photos uploaded by or tagged with the current user This endpoint retrieves data at /me/photos. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

get_user_photos(fields?, limit?, type?) -> {data, paging}
Required scopes:
public_profile

Add Photo to Album

Upload a photo to a specific album This endpoint modifies data at /{album-id}/photos. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

add_photo_to_album(album-id) -> {id, post_id}
Required scopes:
publish_to_groups

Like Object

Like a post, comment, or other likeable object This endpoint modifies data at /{object-id}/likes. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

like_object(object-id) -> {success}
Required scopes:
publish_to_groups

Publish Page Post

Publish a new post to a Facebook Page This endpoint modifies data at /{page-id}/feed. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

publish_page_post(page-id, link?, message?, published?, scheduled_publish_time?, targeting?) -> {id}
Required scopes:
pages_manage_posts

Upload User Photo

Upload a photo to a user's timeline This endpoint modifies data at /{user-id}/photos. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

upload_user_photo(user-id) -> {id, post_id}
Required scopes:
publish_to_groups

Publish Status Update

Publish a new post to a user's feed This endpoint modifies data at /{user-id}/feed. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

publish_user_feed(user-id, link?, message?, place?, privacy?, published?, scheduled_publish_time?, tags?) -> {id}
Required scopes:
publish_to_groups

Get Comments

Get comments on an object (post, photo, video, etc.) This endpoint retrieves data at /{object-id}/comments. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

get_comments(object-id, fields?, filter?, limit?, order?) -> {data, paging}
Required scopes:
public_profile

Create Live Video

Create a live video broadcast on a Facebook Page This endpoint modifies data at /{page-id}/live_videos. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

create_live_video(page-id, status, description?, planned_start_time?, privacy?, title?) -> {id, secure_stream_url, stream_url}
Required scopes:
pages_manage_posts

Get Current User

Returns the User node for the user identified by the access token This endpoint retrieves data at /me. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

get_current_user(fields?) -> {email, first_name, id, last_name, ...}
Required scopes:
public_profile

Get Live Video

Get details of a live video broadcast This endpoint retrieves data at /{live-video-id}. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

get_live_video(live-video-id, fields?) -> {creation_time, description, embed_html, id, ...}
Required scopes:
public_profile

Update Live Video

Update a live video broadcast (e.g., end the broadcast) This endpoint modifies data at /{live-video-id}. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

update_live_video(live-video-id, description?, end_live_video?, title?) -> {success}
Required scopes:
publish_video

Create Page Album

Create a new photo album for a Page This endpoint modifies data at /{page-id}/albums. Requires authentication with appropriate OAuth 2.0 scopes. Supports field expansion via the 'fields' query parameter. Rate limits: 200 requests per hour per access token (may vary by endpoint).

create_page_album(name, page-id, message?, privacy?) -> {id}
Required scopes:
pages_manage_posts

Links

No external links available.

Authentication

  • API Key
  • Oauth2_authorization_code (Primary)