facebook-simple-api
v1.0.1
Published
Wrapped from Facebook's Graph API
Downloads
6
Maintainers
Readme
Facebook Simple API
Wrapped from Facebook's Graph API
Install
> npm install facebook-simple-api
Example
// Import method
const {
getUserInfo,
getFriendList,
getFriendRequest,
getLatestFeed,
getLastActiveUser,
postLikeStatus
} = require('facebook-simple-api')
// Initializing a variable
const ACCESS_TOKEN = 'EAAAAZAw4FxQIBAPXXX'
const ID_USER = '4'
const ID_STATUS = '100000502834385_3933036873389702'
const LIMIT_FETCH = '5'
// Method
- Get User Information
getUserInfo(ID_USER, ACCESS_TOKEN)
.then(response => {
console.log(response)
})
- Get User Friend List
getFriendList(ACCESS_TOKEN)
.then(response => {
console.log(response)
})
- Get All Friend Request
getFriendRequest(ACCESS_TOKEN)
.then(response => {
console.log(response)
})
- Get Your Latest Feed
getLatestFeed(LIMIT_FETCH, ACCESS_TOKEN)
.then(response => {
console.log(response)
})
- Get Last Activity User
getLastActiveUser(ID_USER, ACCESS_TOKEN)
.then(response => {
console.log(response)
})
- Like Status
postLikeStatus(ID_STATUS, ACCESS_TOKEN)
.then(response => {
console.log(response)
})