Post on Facebook

1235 Runs 3619 Views 1545 Copies


sundip 66

published 2 years ago


Post on Facebook

A code example written in node.js that uses the Facebook API to post a message on the logged-in user's timeline. This example makes use of the following:

  • express - a web framework module used to serve up static content and handle routes

  • request - a HTTP request client module used to make calls to Twitter's API

  • qs - a querystring parser

Project contents

  • facebook.js - contains the node.js code used to call Facebook's API to post a message on the user's timeline

  • server.js - contains the node.js code used to setup http server and handle routes for OAuth and posting to Facebook

  • oauth.js - contains the node.js code used to perform OAuth on Facebook and retrieve an access_token

  • index.html - contains html and some client-side JavaScript code that is first loaded when the application is run

  • styles.css - stylesheet used to format the outputted html

  • package.json - holds various metadata relevant to the project such as identifying dependencies


Your session has timed out.

Dismiss (the page may not function properly).