Connect to the Facebook Graph API to retrieve Facebook data and automate actions (ex. posting). Test an API call in your browser and export the code snippet.
The Facebook Graph API is free within certain limits as of 3/1/2017: https://developers.facebook.com/docs/graph-api/advanced/rate-limiting
This is the main package to interact with Facebook users.
Datatype | Description | Example |
---|---|---|
Datepicker | String which includes date and time | |
Map | String which includes latitude and longitude coma separated | |
List | Simple array | |
Select | String with predefined values | |
Array | Array of objects |
Validate user token.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook which should be validated. |
Extend user token.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
app_id | String | The App ID. |
app_secret | String | The app’s app secret. |
Get user Albums.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
prodile_id | String | [opt, =me], Facebook profile id. |
Get user Friends.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
user_id | String | [opt, =me], Facebook user id. |
Get pages liked by user.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
user_id | String | [opt, =me], Facebook user id. |
Get current user profile.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
Get user profile.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
profile_id | String | [opt, =me], Facebook profile id. |
Get user profile picture.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
profile_id | String | [opt, =me], Facebook profile id. |
Get likes.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
object_id | String | Facebook object id. |
Add like to object.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
object_id | String | Facebook object id. |
Delete like from object.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
object_id | String | Facebook object id. |
Get user Feed.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
user_id | String | [opt, =me], Facebook user id. |
Add post to user feed.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
message | String | The main body of the post, otherwise called the status message. Either link, place, or message must be supplied. |
link | String | The URL of a link to attach to the post. Either link, place, or message must be supplied. Additional fields associated with link are shown below. |
place | String | Page ID of a location associated with this post. Either link, place, or message must be supplied… |
tags | String | Comma-separated list of user IDs of people tagged in this post. You cannot specify this field without also specifying a place. |
privacy | String | Determines the privacy settings of the post. If not supplied, this defaults to the privacy level granted to the app in the Login Dialog. This field cannot be used to set a more open privacy setting than the one granted. |
object_attachment | String | Facebook ID for an existing picture in the person’s photo albums to use as the thumbnail image. They must be the owner of the photo, and the photo cannot be part of a message attachment. |
Delete post from user feed.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
post_id | String | Facebook post id. |
Get object comments.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
object_id | String | Facebook object id. |
Add comment to object.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
object_id | String | Facebook object id. |
message | String | The comment text |
attachment_id | String | An optional ID of a unpublished photo uploaded to Facebook to include as a photo comment. |
attachment_url | String | The URL of an image to include as a photo comment. |
Update object comment.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
comment_id | String | Facebook comment id. |
message | String | The updated comment text. |
is_hidden | String | Whether this comment is hidden or visible. The original poster can still see the comment, along with the page admin and anyone else tagged in the comment |
Delete comment from object.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
comment_id | String | Facebook comment id. |
Get user album.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
album_id | String | Facebook album id. |
Create new Album.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
profile_id | String | Facebook profile id. |
name | String | The title of the album |
location | String | A text location of the album for non-page locations. |
message | String | The album’s caption. This appears below the title of the album in the album view. |
place | String | The ID of a location page to tag the album with. |
privacy | String | The privacy of the album. |
Get photos from user album.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
album_id | String | Facebook album id. |
Add new photo to user album.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
album_id | String | Facebook album id. |
photo | String | The URL of a photo that is already uploaded to the internet. |
message | String | The description of the photo, used as the accompanying status message in any feed story. |
place | String | Page ID of a place associated with the Photo. |
no_story | String | If set to true, this will suppress the feed story that is automatically generated on a person’s profile when they upload a photo using your app. |
Get photo.
Field | Type | Description |
---|---|---|
access_token | credentials | Access token obtained from Facebook. |
photo_id | String | Facebook photo id. |