On Dec 12, 9:03 am, nofx <ahisd...@gmail.com> wrote:
Cheers,
Jesse
Sent from my iPhone5
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/phonegap?hl=en?hl=en
>
> For more info on PhoneGap or to download the code go to www.phonegap.com
Then a user can easily log in, but shouldn't there be some way to get
the email address of the person that just logged in? I mean, whats the
purpose of having a Facebook login button if you can't get any details
from it. In example, you can't keep logs on how much someone logs in.
Next to that i normally have a register button which simply requires a
person to submit an email address and a password. The convenience of
having a Facebook Login button is that you don't have to register.
Because you can 'authenticate' yourself with Facebook. But that means
i can never tell which person just logged in...
I hope you see my problem..?? I'm sure there must be some way to tell
who just logged into facebook, right? I don't need their home address
etc. Just the email address (and first/lastname, if possible)...??
On Dec 12, 11:30 am, Jesse MacFadyen <jes...@adobe.com> wrote:
> You would have to ask the user for that info. The API is how it is to protect privacy, so don't expect to just walk around it.
>
> Cheers,
> Jesse
>
> Sent from my iPhone5
>
FB.login(login_callback, {scope:'email'})
(or {perms:'email'} if not using OAuth 2.0, like the FB Connect
plugin)
Then when the login is successful, you can start querying the Facebook
API. In your case, FB.api('/me', user_info_callback) will call
"user_info_callback" with the user's info as a parameter, including
his email.
Example:
{"id":"650408803","name":"Mathieu
Martin","first_name":"Mathieu","last_name":"Martin","link":"http://
www.facebook.com/realwebmat","username":"realwebmat","location":{...},"gender":"male","email":"web...@example.com","timezone":-5,"locale":"en_US","verified":true,"updated_time":"..."}
Mat
On Dec 12, 4:48 pm, webmat <web...@gmail.com> wrote:
> Facebook's API lets you ask for the user's email.
>
> FB.login(login_callback, {scope:'email'})
>
> (or {perms:'email'} if not using OAuth 2.0, like the FB Connect
> plugin)
>
> Then when the login is successful, you can start querying the Facebook
> API. In your case, FB.api('/me', user_info_callback) will call
> "user_info_callback" with the user's info as a parameter, including
> his email.
>
> Example:
>
> {"id":"650408803","name":"Mathieu
> Martin","first_name":"Mathieu","last_name":"Martin","link":"http://www.facebook.com/realwebmat","username":"realwebmat","location":{...},"gender":"male","email":"web...@example.com","timezone":-5,"locale":"en_US","verified":true,"updated_time" :"..."}