-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiled ES5 Version? #129
Comments
This is not a browser library, it's for server usage. It shouldn't be imported into the code packaged up to the client. For browser usage use Facebook's own client side JavaScript API, it has extra features that can only be implemented client side by Facebook. |
@dantman ok thank you |
@dantman it's weird that the module works perfectly fine on my front-end application. I already have user tokens for Facebook so I'm using the |
If anyone else wants an ES5 version here it https://www.npmjs.com/package/fb-es5 I've only tested the graph api part, handling auth with firebase. |
The code is built with If you really, really, want to webpack it (even though I still think a wrapper for Facebook's Client side JS would be much better). In theory it should work if you require |
It was a dumb idea. The compiled version broke pretty quickly. Simple ajax was a better solution. |
Ok, that would be expected. The library isn't intended for browser usage so it uses a node-http based web request library not a XHR or fetch based web request library. Keep in mind that the You could write a Then your client/server-agnostic code would always get a promise from If you want the extra features this library has like |
I'm trying to use this with
create-react-app
. There is a compile issue for this dependency.The documentation says:
https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
The error is:
The text was updated successfully, but these errors were encountered: