views:

243

answers:

1

I am trying to have a connect button on my site. Once the user has clicked the facebook login button, the pop up will ask the user to enter the authentication detail and the parent window will either redirect or refresh the page and the login button became a logout button.

My problem is when a user clicked the connect button from the popup, the popup page will redirect to my canvas page rather than closed the popup instead.

+2  A: 

Many people have posted this issue, if you have done everything else right, the reason for this is xd_receiver file was not read by the fb.

You need to make sure that where your fb connect button is, you specify the correct path to xd_receiver.html file somewhere on bottom of that page. Something like below:

<script type="text/javascript">
 FB.init("your api key here", "xd_receiver.htm");
</script>

It is even better and easier to put the xd_receiver file on your site's root folder and specify it with full domain url like this:

<script type="text/javascript">
 FB.init("your api key here", "http://www.yoursite.com/xd_receiver.htm");
</script>
Sarfraz
Hey Sarfraz, do you have a list of those questions that people have asked about this? I'm getting a `this._opts.channelUrl is null` javascript error upon logging in. The site doesn't redirect, but if I manually refresh I discover that I'm logged in.
gnucom