Just wanted to know if there is any way I could develop Facebook applications in localhost.
This setting is in the Products > Facebook Login > Settings section of the App Dashboard. Disable this setting if you are not building a custom web login flow or using the Facebook Login SDK on the web. Enforce HTTPS.
In the App Dashboard, choose your app and scroll to Add a Product Click Set Up in the Facebook Login card. Select Settings in the left side navigation panel and under Client OAuth Settings, enter your redirect URL in the Valid OAuth Redirect URIs field for successful authorization.
Of course you can, just add the url localhost (without "http") in your app_domain and then add in your site_url http://localhost
(with http)
Update
Facebook change the things a little now, just go to the app settings and in the site url just add http: //localhost
and leave the App Domain empty
Edit: 2-15-2012 This is how to use FB authentication for a localhost website.
I find it more scalable and convenient to set up a second Facebook app. If I'm building MyApp, then I'll make a second one called MyApp-dev.
Website
checkbox under 'Select how your application integrates with Facebook' (In the recent Facebook version you can find this under Settings > Basic > Add Platform - Then select website)if Rails.env == 'development' || Rails.env == 'test' Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook, 'DEV_APP_ID', 'DEV_APP_SECRET' end else # Production Rails.application.config.middleware.use OmniAuth::Builder do provider :facebook, 'PRODUCTION_APP_ID', 'PRODUCTION_APP_SECRET' end end
I prefer this method because once it's set up, coworkers and other machines don't have additional setup.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With