Closed rickiesmooth closed 8 years ago
using .val parses the value so from that moment its not being observed anymore fix by remove.val -- if this does not work take it up with marcus and check if the facebook api fires
also this is wrong
facebook.user.token.on('data', function () {
element.api['facebook-login'].set(facebook.user.token.val)
})
since for now as mentioned in other issues in api you can only use references (not straight values), you don't need to listen specificly on facebook.token.val when you use this
module.exports = {
title: ['$', 'text', 'acount', 'signin', 'title'],
logo: true,
buttons: {
order: 2,
signin: ['$', 'modals', 'login'],
facebook: {
title: 'Login met facebook',
api: 'facebook-login',
data: facebook.user.token, ///<---- look different!
buttonType: 'submit'
}
}
}
I declared the following API method:
To POST the user token that I receive from facebook, I do the following:
Unfortunatly this doesn't work, and when I try to use it in my modal data, it also doesn't work:
The last method is probably totally wrong, but I expected that the first method should work. What am I doing wrong @jimdebeer