jeduan / cordova-plugin-facebook4

Use the latest Facebook SDK in your Cordova and Ionic projects
Other
767 stars 511 forks source link

get acces_token for send in my personnal login #874

Closed CedLP closed 3 years ago

CedLP commented 4 years ago

Hello, i try to get access_token with ionic but i can't i have nothing

Facebook.login(['email', 'public_profile']).then((response: FacebookLoginResponse) => { console.log(response); this.fbk.api('me?fields=id,name,email,first_name,picture.width(720).height(720).as(picture_large)', []).then(profile => { console.log('uciu', profile); }); });

i use this, how can i get access_token please ? I received token when dialogue is open but when dialog is close i can't receive token, someone can help me how to received token after dialog is close ?

noahcooper commented 3 years ago

This plugin is deprecated. Check out cordova-plugin-facebook-connect at https://www.npmjs.com/package/cordova-plugin-facebook-connect.

Your syntax doesn't look correct for using the Ionic wrapper. See the docs at https://ionicframework.com/docs/native/facebook.