zyra / ngx-facebook

Angular TypeScript Wrapper for Facebook SDK
http://zyra.github.io/ngx-facebook/
MIT License
209 stars 70 forks source link

Dynamically loading Facebook SDK script #60

Open ghost opened 7 years ago

ghost commented 7 years ago

Hi, I'm wondering if it's worth it to add a method that dynamically/asynchronously adds the FB SDK script rather than manually add the reference in the index.html file? Would you be open to PRs for that kind of change? Thanks!

ihadeed commented 7 years ago

Sure we could do that.

Doesn't Facebook have that asynchronous function that injects the script? We can probably wrap that with a promise if it has callbacks.

PRs are welcome :)