New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@palante/facebook-api-tools

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@palante/facebook-api-tools

facebook api tools

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

Palante Facebook API Tools

Description

Palante Facebook API Tools is a suite of tools leveraging facebook API's for use in node.js services. Leverages the fb facebook libarary found here to communicate with Facebook APIs.

Installation

npm i @palante/facebook-api-tools

Modules

getProfileInfo

Get profile info from facebook based on access token and queries profile @ /me.

import {getProfileInfo} from '@palante/facebook-api-tools';

const accessToken = 'myAccessToken';

getProfileInfo(accessToken, (err, profile) => {
    // your profile logic here
});

Upsert

Updates profile records in your persistence layer. A Data Access Object (DAO) must be passed in.

Simple DAO Example

perform your upsert logic here:

const dao = {
    save(profile, callback) {
        const saveProfile = saveProfile(profile);
        console.log('saved profile: ', profile);
        callback(null, profile);
    }
};

Use in project

Import and use in project

import {fbUpsert} from 'facebook-api-tools';

const upsert = fbUpsert(dao); // pass in Data Access Object here.

upsert(accessToken, function (err, result) {
    // error/result handling here.
});

FAQs

Package last updated on 21 Feb 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts