Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

facebook-node-sdk

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

facebook-node-sdk

Node.js SDK for the Facebook API

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
593
decreased by-14.92%
Maintainers
1
Weekly downloads
 
Created
Source

Facebook Node SDK

Facebook API Implementation in Node.

Build Status

Features

  • Supports all Facebook Graph API, FQL, and REST API.
  • Compatible with the official Facebook PHP SDK.

Install

To install the most recent release from npm, run:

npm install facebook-node-sdk

Synopsis

var Facebook = require('facebook-node-sdk');

var facebook = new Facebook({ appID: 'YOUR_APP_ID', secret: 'YOUR_APP_SECRET' });

facebook.api('/amachang', function(err, data) {
  console.log(data); // => { id: ... }
});

With express framework (as connect middleware)

var express = require('express');
var Facebook = require('facebook-node-sdk');

var app = express.createServer();

app.configure(function () {
  app.use(express.bodyParser());
  app.use(express.cookieParser());
  app.use(express.session({ secret: 'foo bar' }));
  app.use(Facebook.middleware({ appId: 'YOUR_APP_ID', secret: 'YOUR_APP_SECRET' }));
});

app.get('/', Facebook.loginRequired(), function (req, res) {
  req.facebook.api('/me', function(err, user) {
    res.writeHead(200, {'Content-Type': 'text/plain'});
    res.end('Hello, ' + user.name + '!');
  });
});

FAQs

Package last updated on 04 Feb 2012

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc