I have a site that uses, exclusively, Facebook authentication as it’s membership system. In the Facebook app settings the callback url is set to the site’s domain.
I’d like to continue development of the site, locally… while keeping the site live as well. However, since the callback url is the site’s live domain name and not the localhost address, the Facebook authentication parts fail.
Is it possible to have both a localhost and a domain callback url active? If not, what’s standard practice in continuing local development of a site that is already live?
Assuming you use ASP. But will work for any language.
You can create another application in facebook with http://localhost as the domain name. Store the appid and secret in the web.config file separately.
Then in the code behind of your master page, check for the Request.ServerVariables(“HTTP_HOST”) and if it is localhost, use the appropriate settings from the web.config file.