pitchtarget / ember-cli-facebook-js-sdk

Simple Facebook SDK for Javascript addon for your Ember CLI app.
MIT License
29 stars 15 forks source link

Allow FBInit to take options #24

Closed patocallaghan closed 7 years ago

patocallaghan commented 7 years ago

We've just updated this addon from 0.0.4 to 1.0.8 and noticed the ability to pass options to your init was missing.

Currently FBInit doesn't take any options so you cannot pass it a locale or appId to use. For instance, where we use this addon, we never know at build-time what appId to use. Instead, at run time, based on various criteria we determine which one to use.

bugant commented 7 years ago

Thank you @patocallaghan. Sorry for taking so long to come back to you.

In the first place I did not included such options argument to FBInit because it is automatically invoked by any other service function: for example, see api here https://github.com/pitchtarget/ember-cli-facebook-js-sdk/blob/master/addon/services/fb.js#L81

Anyway once initialized the init is not re-done anyway, so if you will to explicitly call the FBInit with options I think it is OK.