facebook connect ( login and register by facebook)

memento picture memento · Mar 7, 2011 · Viewed 8.5k times · Source

i was looking for the right plugin to make register and both login users to my site,

but i've checked facebook connect plugin is no more supported... that's right?

which is the right fb plugin doc link to have registration and login by facebook on our sites?

sincerily i can't find the right link :/

i mean i've found login plugin and registration plugin but which is the one could gives me both fb registration and login actions to my site? some links?

thanks :)

Answer

Shaan picture Shaan · Apr 25, 2011

Hey Memento I understand your issue. I was very confused by all of this also and couldn't determine the appropriate way to register the user via Facebook on my site. I suggest actually using the javascript SDK and create your own button based on the user's facebook connection status.

So basically, do the following: Check if the user is registered via Facebook using FB.getLoginStatus function. If he is, log him into your site. If he's not, then display a button that says Login to Facebook. On click, the button should use the FB.Login function and get the user's permissions. After that, redirect the user to the Facebook Registration form and sign him up. Set the redirect URI of this plugin to the appropriate script in your site which will register him on your site as well.

Let me know if that helps.