capacitor-community / facebook-login

Facebook Login support
MIT License
103 stars 54 forks source link

How is this supposed to work with Vue? #48

Closed Torone closed 3 years ago

Torone commented 3 years ago

Describe the bug It is not a bug I think, it is more a missing documentation to let it work.

const result = await <FacebookLoginResponse>FacebookLogin.login({ permissions: FACEBOOK_PERMISSIONS });

This block of code doesn't work on Vue.js obviously because of the <FacebookLoginResponse>.

So far I tried to just remove it, but it doesn't work:

const result = await FacebookLogin.login({ permissions: FACEBOOK_PERMISSIONS });

I tried to let it work like on the Google one, but it doesn't work:

import { Plugins } from '@capacitor/core'
...
const result = await Plugins.FacebookLogin.login({ permissions: FACEBOOK_PERMISSIONS });

The error I get is the following: Error: {"code":"UNIMPLEMENTED"}

Is it possible to let it work for normal Javascript? Thanks

To Reproduce Steps to reproduce the behavior:

  1. Use it with Vue.js