0

I was following this tutorial - Getting Started with an ASP.NET MVC 3 Website (With Javascript SDK) link here

I downloaded the source code, ran it and when I tried logging in I got

An error occurred with My Test Website. Please try again later.

I've tried it with all browsers and all of them gave me the same error.

The link generated is this

https://www.facebook.com/dialog/oauth?api_key=102723069811232&app_id=102723069811232&client_id=102723069811232&display=popup&domain=localhost&locale=en_US&origin=1&redirect_uri=https%3A%2F%2Fs-static.ak.fbcdn.net%2Fconnect%2Fxd_proxy.php%3Fversion%3D3%23cb%3Df9d7721230dd47%26origin%3Dhttp%253A%252F%252Flocalhost%252Ff3cc1660b85125c%26relation%3Dopener%26transport%3Dflash%26frame%3Df3417010ce0d8cc&response_type=token%2Csigned_request&sdk=joey

Can you tell me what's going wrong as I haven't changed any of the code? If possible can you also provide me the log in link generated for you so I could compare it?

Thanks

Community
  • 1
  • 1
user972616
  • 1,324
  • 3
  • 18
  • 38

1 Answers1

0

You are trying to run the application on your local host where Facebook needs a proper domain to authenticate.

When you create your app, it asks you for the domains you are going to use. Your application requests needs to come from that domain otherwise it won't work.

Derik Nel
  • 423
  • 2
  • 10
  • In the tutorial they have used localhost so i'm assuming you can just specify localhost as the app domain – user972616 Jan 31 '12 at 19:01
  • Indeed, have a look here : http://stackoverflow.com/questions/5133075/running-facebook-application-on-localhost I tried to get this working from localhost and kept getting the error you were getting until i uploaded it to my domain and it worked fine then. Hope that link helps... – Derik Nel Jan 31 '12 at 19:05
  • Replying to this after long, but I made it work on localhost. Add Site URL-http://localhost/ and Site Domain- localhost. Hope it helps – user972616 Feb 16 '12 at 18:22