views:

59

answers:

1

Hey,

well I'm reading the fb connect tutorial here

http://wiki.developers.facebook.com/index.php/Facebook_Connect_Tutorial1

The problem I'm having is near the end of the tutorial, it's saying do do this

<script type="text/javascript">  FB.init("apikey","xd_receiver.htm", {"ifUserConnected" : update_fbuser}); </script> 

as oppose to

<script type="text/javascript">  FB.init("apikey","xd_receiver.htm"); </script> 

Now my problem is, when i use the first one, the login to facebook button I have stops showing, does anyone notice anything wrong with the first one, the second one works fine (just doesnt use the ifuserconnected)

Thanks :)

+2  A: 

First of all you are looking at the old API now deprecated. If you are just starting you better start with the current one. You can read about it here.

As to your code. You need to declare callback function update_fbuser() that will be called when a user login status changes. You probably don't have it so it breaks. You can find more examples here (but again those are from old API, now things are completely different).

serg
I have the function after that bit of code, is that still ok?
Belgin Fish
@Belgin If you have that function then something else is wrong. Have you checked firebug console is there any errors? Anyway, I wouldn't spend much time on it as it is old api, better look into new one.
serg
Recommend any tutorials for the new api?
Belgin Fish
@Belgin Sorry I don't know any... Try to start from here: http://developers.facebook.com/docs/
serg

related questions