Closed danilovaz closed 7 years ago
@danilovaz I think that the Facebook JS sdk does not support this scenario, I mean you cannot initialize the sdk twice.
@bugant This is possible. I try setting two differents appIds and this works. The problem is: I can't (or I don't know how) sent to config/environment.js the appId I need.
Example: ENV.FB = { appId: someVariable }
Can I configure your addon to use like an service and send the appId I want?
I can't do something like that, for each call I need?
action1() {
this.get('fb').FBInit({ appId: '12345678' }).then((response) => {
console.log(response);
});
},
action2() {
this.get('fb').FBInit({ appId: '9876543' }).then((response) => {
console.log(response);
});
}
@danilovaz at the moment the addon supports only a single app initialization... one vaiable solution would be the one you suggested of passing parameters to init: in that case the cached init promise could be discarded and a new init will be performed.
I'm not convinced this is something supported by the Facebook SDK though, do you have a link to the documentation that talk about this?
@danilovaz any news on this? My concern is that even if it could work I cannot find any official documentation about initializing the FB js SDK twice in the same page.
@danilovaz I'm closing this issue since I have no new info on it. Please, re-open it if you are willing to discuss on this topic.
@bugant Hey man, really thank's for this addon!
I need to know: Can I set appId dynamic? For example, I have 2 differents appIds and depend where it is call, I will use appId X or appId Y.