FacebookGraphAPI

FREE
By serg.osipchuk
Updated 5 months ago
Social
7.8/10
Popularity Score
376ms
Latency
100%
Success Rate

FacebookGraphAPI API Documentation

Retrieve Facebook data and automate actions (ex. posting).

View API Details
POSTaddComment
POSTaddFeedPost
POSTaddLike
POSTaddPhotoToAlbum
POSTcreateAlbum
POSTdeleteComment
POSTdeleteFeedPost
POSTdeleteLike
POSTextendUserToken
POSTgetAlbum
POSTgetAlbumPhotos
POSTgetComments
POSTgetCurrentProfile
POSTgetLikes
POSTgetPhoto
POSTgetProfile
POSTgetProfilePicture
POSTgetUserAlbums
POSTgetUsersFeed
POSTgetUsersFriends
POSTgetUsersLikedPages
POSTupdateComment
POSTvalidateUserToken
POSTaddComment

Add comment to object.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
object_idSTRING
REQUIREDFacebook object id.
access_tokenSTRING
REQUIREDAccess token obtained from Facebook.
Optional Parameters
attachment_idSTRING
OPTIONALAn optional ID of a unpublished photo uploaded to Facebook to include as a photo comment.
messageSTRING
OPTIONALThe comment text
attachment_urlSTRING
OPTIONALThe URL of an image to include as a photo comment.
Code Snippet
unirest.post("https://FacebookGraphAPIserg-osipchukV1.p.rapidapi.com/addComment")
.header("X-RapidAPI-Host", "FacebookGraphAPIserg-osipchukV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://FacebookGraphAPIserg-osipchukV1.p.rapidapi.com/addComment
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.post("https://FacebookGraphAPIserg-osipchukV1.p.rapidapi.com/addComment")
.header("X-RapidAPI-Host", "FacebookGraphAPIserg-osipchukV1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication