开发者

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 开发者_Go百科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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜