Skip to content

Login doesn't work #13

@nubu

Description

@nubu

Hi,

i'm trying to get the login working - without success at the moment.

Calling authorize opens the facebook app, show me everything correctly ... after clicking on the "accept" button to allow the facebook app the user returns into my test app and nothing happen.

Neither the function from authorize is called or the login listener. Any idea? Is there something that i'm missing?

Facebook.addEventListener('login', onLogin);
Facebook.authorize(['public_profile', 'email'], function(fbEvent) {

    console.log(fbEvent);

     if (fbEvent.success) {
     console.log(fbEvent.accessTokenData);
     facebook.requestNewPublishPermissions(['publish_actions'], facebook.audienceFriends, function(writeEvt) {
     console.log(writeEvt);
     });
     } else if (fbEvent.cancelled) {
     console.log("Canceled");

     } else if (fbEvent.error) {
     console.log("error");
     }
});

}

function onLogin(e){
console.log(e);
alert("login");
}

Best,
Nico

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions