Speed up development with full-stack environments for every branch.

Learn More

Post on Facebook

2051 Runs 7251 Views 2921 Copies


sundip 66

published 5 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

Please login/signup to get access to the terminal.

Your session has timed out.

Dismiss (the page may not function properly).