Big issue with Facebook signup

Issue #227 resolved
Enrico Piccini created an issue

Hi @dwmarrs I think you implemented a login and not a subscribe.

Every time I try to signup with new user the api answer is always that we miss to send the email and that's true. Take a look on the facebook signup function of udemi.js

Comments (4)

  1. David Marrs

    @enricosoft what I've discovered tonight is that if I add a breakpoint at the one call to Udemi.auth.FB._subscribe() I can see that response.email (from the call to FB.api('/me', { fields: 'id,first_name,last_name,email' }, ...) is undefined. response.id, response.first_name & response.last_name are ok. Do you think they've changed their API?

    That was on localhost (now that I have access to test users for the localhost app).

    I'll look a bit more tomorrow night.

  2. David Marrs

    ok, if I roll as far back as commit 9409277 on 2016-03-16 'tour and typo fixes' then response.email is defined again. I think if we want this done in a hurry then we shall have to revert to using the button provided by facebook rather than a custom one, and pick this up again later.

    I'll see how far I get with what remains of this evening

  3. David Marrs

    Merged what I've got so far into develop branch.

    Code needs tidying up, and cases where user has not authorised the app maybe need handling more gracefully, but it'll do for now. Marking as closed.

  4. Log in to comment