Created: 2012-03-21 15:35
Updated: 2013-10-10 14:42

My band page

Work in progress.
Trying to make easier to set up a band page with no kind of backoffice :

  • news will be retrieved from Facebook
  • biography & discography will be retrieved from discogs
  • music videos from youtube
  • music audio clips from soundcloud


get repository

cd mybandpage
bundle install --without production

set up your env variables

Create a .env file with your Facebook credentials

FB_APP_ID=<your facebook app id>
FB_APP_SECRET=<your facebook app secret>

run tests

bundle exec rspec -c --format doc


Set up heroku

Push the vars on heroku

heroku config:add FB_APP_ID
heroku config:add FB_APP_SECRET

Pushing to Heroku

git push heroku master
heroku rake db:migrate
heroku open

Some notes

FB : getting token without asking user to authenticate[FB_APP_ID]&client_secret=ENV[FB_APP_SECRET]&grant_type=client_credentials

FB : retrieving page wall

fb_graph usage

page ='brocolirecords', :access_token => FacebookOauthEndpoint.token)
# feed
feed = page.feed
# 11th message
# link
# image
if page.feed[2].type == "photo" then
  image_id = page.feed[2].graph_object_id
  photo =
  photo_url = photo.images[0].source

Twitter Bootstrap

The RoR Tutorial likes the 'bootstrap-sass' gem. Create the file : app/assets/stylesheets/custom.css.scss

@import "bootstrap";
@import "bootstrap-responsive";


Geoffroy Montel

Cookies help us deliver our services. By using our services, you agree to our use of cookies Learn more