Wizcorp / phonegap-facebook-plugin

The official plugin for Facebook in Apache Cordova/PhoneGap
Other
1.91k stars 2k forks source link

Not able to login using the plugin #1319

Open abunour22 opened 8 years ago

abunour22 commented 8 years ago

I have integrated this plugin in my app, I am calling login as below:

facebookConnectPlugin.login(["email"], facebookLoginSuccess, facebookLoginFailure);

but nothings happens !!

sarahmonks commented 8 years ago

hi... have u created a new app on facebook and got an app ID?

abunour22 commented 8 years ago

yes and I've created the hash, and works great with $cordovaOauth , but i don't want to use $cordovaOauth to login via Facebook nay more as they request to enter Email & Password every time i want to login with Facebook , so i decided to move to phonegap-facebook-plugin

but i'm stuck there !! and there is no response or errors returns in console or even in app it self.

sarahmonks commented 8 years ago

ok. did you put something like this in your config.xml file? <gap:plugin name="com.phonegap.plugins.facebookconnect" version="0.8.0"> <param name="APP_ID" value="my_app_id" /> <param name="APP_NAME" value="my_app_name" /> `</gap:plugin>`` and also if i was you i would try this instead. i'm not an expert but this works for me: facebookConnectPlugin.login(["public_profile"], facebookLoginSuccess, facebookLoginFailure);

abunour22 commented 8 years ago

Does not working either. I'm using Ionic Framework.

arinrare commented 8 years ago

Using Ionic here too. The plugin works perfectly on android, but on iOS, when i call facebookConnectPlugin.getLoginStatus( Function success, Function failure) i get no return, success or failure.

abunour22 commented 8 years ago

What did you do to make it works on android ?!

arinrare commented 8 years ago

I followed this tutorial: https://ionicthemes.com/tutorials/about/native-facebook-login-with-ionic-framework

Check that you have covered all the steps here, and modify the source code in the tute as you see fit for what you are doing. It was much easier to get working for Android than iOS for me. I am hoping someone can tell me why i am getting no return from the login or getLoginStatus functions on iOS

abunour22 commented 8 years ago

@mbaggott @sarahmonks thanks to all of you, I use https://github.com/jeduan/cordova-plugin-facebook4 & followed the tutorial of @mbaggott and now its working like charm on android, i didn't test it on IOS yet.

arinrare commented 8 years ago

Excellent @abunour22 that's good to hear, let me know if/when you test it on iOS, i would be interested to know how you go. I have a possible solution to try out tomorrow for iOS, and that involves using another fork of this project.

arinrare commented 8 years ago

Can confirm the plugin works for iOS using the branch https://github.com/jeduan/cordova-plugin-facebook4