What's wrong with my FB connect implementation?
I'm working on a site that uses Facebook connect for single signon. It seems to work OK in all browsers except IE. When clicking the "connect" button in IE I get the login popup appear but instead of showing the login dialog it tries to display
http://dev.mysite.com/?fb_xd_fragment#?=&cb=f2f370e9419aa2c&relation=opener&transport=fragment&frame=f366b7f0bcf79f4&result=%7B%22perms%22%3A%22email%2Cpublish_stream%22%2C%22selected_profiles%22%3A674561930%2C%22session%22%3A%22%7B%5C%22session_key%5C%22%3A%5C%222.MRrJZlv1JeAhFW5koMUK_g__.3600.1292436000-674561930%5C%22%2C%5C%22uid%5C%22%3A%5C%22674561930%5C%22%2C%5C%22expires%5C%22%3A1292436000%2C%5C%22secret%5C%22%3A%5C%22ex6QAIvguKufbSs5s_3TNw__%5C%22%2C%5C%22base_domain%5C%22%3A%5C%22stageidol.se%5C%22%2C%5C%22access_token%5C%22%3A%5C%22122307124493264%7C2.MRrJZlv1JeAhFW5koMUK_g__.3600.1292436000-674561930%7CP4DnM9QFx44a开发者_如何学编程kf0HjfftI40G7No%5C%22%2C%5C%22sig%5C%22%3A%5C%223d7125091d2a633ccf3dbead153b185c%5C%22%7D%22%7D
Which can't load and is just white. IE also displays an errormessage about all.js (included by FB connect):
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) Timestamp: Wed, 15 Dec 2010 16:11:50 UTC
Message: Permission denied Line: 16 Char: 2188 Code: 0 URI: http://connect.facebook.net/en_US/all.js
Obviously hard to debug since it's minified JS.
Try putting the channelURl, that should solve your problem.
http://developers.facebook.com/docs/reference/javascript/fb.init/
<script>
FB.init({
appId : 'YOUR APP ID',
channelUrl : 'http://example.com/channel.html' // custom channel
});
</script>
Content of channel.html :
<script>
document.domain = "example.com";
</script>
<script src="http://connect.facebook.net/en_US/all.js"></script>
精彩评论