Post on Facebook

904 Runs 2110 Views 847 Copies
Saved

Saved

sundip 66

sundip
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

Terminal

Your session has timed out.

Dismiss (the page may not function properly).