This is a small Sinatra application to demo how to integrate with Facebook through oauth2
Setup new facebook application here and point it to your webapp.
Ensure that you have Canvas URL and Secure Canvas URL pointing properly to where you have your webapp hosted. (I recommend Heroku for testing)
Next - copy App ID and App Secret into facebook_app_config.yml.template' and rename it to 'facebook_app_config.yml' application name is required too as the webapp resolves/builds up urls based on the name you have given to it on FB DEVELOPERS site.
This is it you are ready to go - navigate to http://apps.facebook.com/NAME\_OF\_YOUR\_APP and you are good to go!
Feel free to do whatever with this...