简体   繁体   中英

Cannot connect to Facebook Connect

I'm using the following step by step guide to connect to Facebook Connect:

http://msdn.microsoft.com/en-us/windows/ee702803.aspx

However I have a problem at the 'Authentication and Initiating a Session' stage.

When I go through the steps, I click on 'Connect' in my browser, which opens a popup, where I login to Facebook and 'Allow' the application to access my account. I'm then redirected to the filename I specify in thw 2nd parameter of the javascript function 'FB.init'.

However, this page then displays:

Please sign-in with Facebook.

Why is this happening? I'm developing this on localhost, I don't know if that could cause a problem? Please help! Thanks.

You actually can use localhost. The one problem you may have is that there is a bug with the Facebook Javascript SDK in internet explorer if you are on a port other than 80 or 443. http://github.com/facebook/connect-js/issues#issue/106

If you check out my Facebook .Net SDK on codeplex you can download the sample app. As it is configured it will run locally. The one thing is you need to set your site url and/or canvas url to point to http://localhost:port#/

Do download the sample go to: http://facebooksdk.codeplex.com

I ran into a similar problem where I could not test Facebook on localhost. Due to security requirements from Facebook you must test from the domain you used to register your application.

Create a dev.yourname.com subdomain and test it there.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM