Ruby on Rails OmniAuth Facebook works for Live App on Heroku but not Test App on Cloud9 Ruby on Rails OmniAuth Facebook works for Live App on Heroku but not Test App on Cloud9 heroku heroku

Ruby on Rails OmniAuth Facebook works for Live App on Heroku but not Test App on Cloud9


When you set the urls for your website in the Facebook Developer Settings page, you have to provide two urls.

  1. The base url of your website (www.example.com)
  2. The callback url of your website (www.example.com/auth/facebook/callback)

If one or the other is not present, you will get those errors telling you that the callback url is not whitelisted or the website url is not whitelisted.

Add you website as a platform under Settings > Basic then look for "Add Platform". Add your website URL there.

enter image description here

It seems that c9 adds a port number to the callback URI. Try adding that port number to the OAuth valid callback URIs:

http://[workspace]-[username].c9.io:80/auth/facebook/callbac‌​k


Looks like this is an issue with how you've registered and configured your app in Facebook. Be sure you've added these URIs to your Facebook app whitelist. See here for more details.