开发者

facebook connect button not producing pop-up

开发者 https://www.devze.com 2022-12-25 18:20 出处:网络
This is a really simple question, but I can\'t seem to find the answer. I am just getting started with Facebook Connect. I would like to use it only for user authentication, so there is no need for my

This is a really simple question, but I can't seem to find the answer. I am just getting started with Facebook Connect. I would like to use it only for user authentication, so there is no need for my users to create another account.

I used a very basic example from wiki.developers.facebook.com :

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml">
<head></head>
<body&g开发者_开发百科t;

<fb:login-button></fb:login-button>

<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php/en_US" type="text/javascript"></script>

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

</body>
</html>

Very straight forward. It seems to work fine. However, if I am currently already logged in to Facebook, the pop-up window doesn't come up when I click the login button. Why is that?


If you are logged in, and already allowed this application to connect to facebook, then you're signed in already (hence single sign on), and there is nothing to do. Your page can access the users facebook session information. Connecting an application to a facebook account is a one time procedure. Once you allow the connection, it doesn't occur again.

To get the pop-up, go to your facebook page, and under application settings, remove the autorization for this application to access your facebook information (NOTE: THIS IS NOT THE SAME SETTING AS YOUR DEVELOPER APPLICATION SETTINGS! DONT DELETE THE APPLICATION ITSELF!)

The next time you are logged in to facebook, and attempt to connect to this application, you'll see the pop-up box asking you to connect. Again, once you're connected, you wont see the pop up.

If you're not logged in to facebook, you'll be redirected to Facebook and asked to login.

I hope this helps.

0

精彩评论

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

关注公众号