After being fully frustrated with not being able to test my facebook login on my local server, I finally created a staging environment. I am hoping this will be helpful for my front-end developer and mastermind of this particular project as well.
Steps to setting up staging environment
Here you are creating a staging app with the same addons your production app has. Be sure to add a comma delimited-list of the addons, no whitespaces!
check to see that you have successfully created your staging app with
git remote -v
Let’s change the the staging app’s name and domain to something a little more memorable. Go to your dashboard at Heroku and click on your newly created staging app, in my case, it’s called floating-stream-1039. In Settings, go ahead and change the name.
In your staging-app’s info page on heroku, find the new git url. Copy and paste.Remove the current staging app and add the one with the new name.
Go to developers.facebook.com and click on “Create New App.”
Retrieve your facebook ID and secret codes on developers.facebook.com. Then add them as config keys on heroku. I prefer saving these keys separately from my app’s files.
I used the “omniauth-facebook” gem. Then I created the file
config/initializers/omniauth.rb and added the following code.
Hope this is helpful!
Make yourself useful.