Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I add localhost:3000 to Facebook App for development

I am working on a Rails 4 app. On my laptop, development is done at localhost:3000. The actual domain of the site is roomidex.com.

How can I set up a Facebook app so it works on production and development?

Here is the current configuration:

App Domains: roomidex.com  Website With Facebook Login:  Site URL: http://www.roomidex.com 

When I try to do a Facebook login on localhost:3000, I get this not surprising error:

{    "error": {       "message": "Invalid redirect_uri: Given URL is not allowed by the Application configuration.",       "type": "OAuthException",       "code": 191    } } 
like image 851
Don P Avatar asked Jan 03 '14 18:01

Don P


People also ask

How can I login to Facebook in localhost?

You need to register as facebook developer and create you app there. Once you have your web app registered you can go to your app and click on add product. Add Facebook Login. Then enable Web OAuth Login and add your localhost in the textfield below and save, you should be able to access it.


1 Answers

On the Facebook App page, click "edit App" then click "Advanced" in the left-hand navigation. Then for "Valid OAuth redirect URIs" add http://localhost:3000... or whatever you want the accepted redirect to be.

like image 81
Don P Avatar answered Sep 28 '22 02:09

Don P