views:

2314

answers:

4

Facebook Connect allows for very limited communication and access to the user's information.

When a user logs in with Facebook Connect I would like to create an account for the user on our site that is linked up to their Facebook account.

The only problem is registration (MembershipService.CreateUser(username, password, email)) requires an email address, which we do not have access to. (We let them choose a username before linking up the accounts).

How would you register a user without having their email address?

I would rather not make them enter it in when they link up the accounts, and I know it can be done. Digg does a very nice job of exactly what I would like to do.

A: 

Remove the requirement that the user provide an email address. After all, they won't have a password either, so you're going to have to change CreateUser anyway. If the user does something that will need communication back to them, prompt for an email at that time - or wait for facebook to implement "Sending user-to-user notifications" in the fbconnect API, and send mail through facebook itself.

bdonlan
+2  A: 

You can register the user with your site but let the user know they have been partially registered and to complete the registration they must enter their remaining personal details (i.e. email address)

Still allow the user to utilise your website but always prompt them that they have not yet completed their registration.

It's just like Stack Overflow, you don't have to register your email address with them unless you wish to receive email updates on your posted questions etc

Thanks

mlevit
A: 

I agree with the above poster's "partial" solution. Perhaps – since the Facebook BIGINT "user id" is unique, you could populate the email field with [email protected] ([email protected]), indicating that the email is supplied by Facebook. You don't have access to a FB user's email address directly, so really, there's no way around it. You could just add a null or empty string for the password. Honestly, though, doesn't sound like your users table is very well set up for facebook connect. Any way to rewrite? So a user entry can either be

MembershipService.CreateUser(username, password, email)

OR

MembershipService.CreateUser(facebook_user_id)
Typeoneerror
+1  A: 

There's a storable address, called Proxied Email, that you may be interested in.

philfreo