Skip to content
This repository

New friends, lost ones, know about them.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 extra
Octocat-spinner-32 node_modules
Octocat-spinner-32 public
Octocat-spinner-32 views
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .ruby-version
Octocat-spinner-32 Cakefile
Octocat-spinner-32 Procfile
Octocat-spinner-32 Readme.md
Octocat-spinner-32 app.js
Octocat-spinner-32 env-schema
Octocat-spinner-32 package.json
Octocat-spinner-32 web.js
Readme.md

Facebook/Heroku sample app -- Node.js

This is a sample app showing use of the Facebook Graph API, written in Node.js, designed for deployment to Heroku.

Run locally

Install dependencies:

npm bundle install

Create an app on Facebook and set the Website URL to http://localhost:5000/.

Copy the App ID and Secret from the Facebook app settings page into your .env:

echo FACEBOOK_APP_ID=12345 >> .env
echo FACEBOOK_SECRET=abcde >> .env

Launch the app with Foreman:

foreman start

Deploy to Heroku via Facebook integration

The easiest way to deploy is to create an app on Facebook and click Cloud Services -> Get Started, then choose Node.js from the dropdown. You can then git clone the resulting app from Heroku.

Deploy to Heroku directly

If you prefer to deploy yourself, push this code to a new Heroku app on the Cedar stack, then copy the App ID and Secret into your config vars:

heroku create --stack cedar
git push heroku master
heroku config:add FACEBOOK_APP_ID=12345 FACEBOOK_SECRET=abcde

Enter the URL for your Heroku app into the Website URL section of the Facebook app settings page, hen you can visit your app on the web.

Something went wrong with that request. Please try again.