1

I am using ngx-facebook module to integrate Facebook login and it requires Facebook JavaScript SDK. I want to download it somehow with npm, but can't find working package. I don't like the idea of script tag which provided by facebook.

<script type="text/javascript" src="https://connect.facebook.net/en_US/sdk.js"></script>

1 Answer 1

2

There isn't any other way which they support unfortunately. There's npm packages for server-side logic, but none for the client side. This is a common pattern with the SDKs provided by bigger companies (for Maps or ads from Google for example). You can only import them via a <script> and only refer to the latest version.

You could always just download the .js and place it next to your project as a "binary"-ish dependency and configure Webpack or whatever it is you're using for bundling to handle it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.