Dave Lee
Dave Lee

Reputation: 508

Facebook registration plugin without redirect

We are currently using the Facebook registration plugin to sign up users (we let them signup without it too).

We were using the FB login plugin previously but needed to allow users to set their passwords for our site, which the login plugin doesn't allow.

The way the login plugin works is that on authorization the FB javascript sdk triggers an event which your client side code can subscribe to. I would like to know if there is a way to have a similar flow but using the registration plugin. That is, instead of redirecting to a specified url when the user authorizes our app, catch the registration info in a javascript callback so we can register the user through an ajax interface.

Upvotes: 1

Views: 386

Answers (1)

Connor Treacy
Connor Treacy

Reputation: 1082

The registration plugin doesn't provide any client-side callback in place of the redirect_uri. You can achieve this with FB.login, by handling the event and using the access token and user id from the authResponse to do a Graph API call to get the info you need to populate a registration form client-side. This registration form can ask for a password, which you can associate with the account along with the user id for future seamless logins from Facebook.

Upvotes: 1

Related Questions