How to login with Facebook now?



I used to use angular-easyfb with the Facebook Cordova plugin.
But while reading this,, it seems I’m now stuck.

What is the current way to connect with Facebook using Ionic?

Thanks a lot :slight_smile:



This seems to work really well.


Actually what I did is:

  1. Installing this:
    Adding manually the .m and .h files into the right plugin folder (not done automatically, sounds like a bug)
  2. Installing this: in order to benefit from Angular encapsulation.

Works pretty well, as well for native API or Browser :slight_smile:

Does ng-crodova has Facebook login?
Does ng-crodova has Facebook login?

Hmm, that cool, I didn’t know about this!

Thanks for sharing that :smile:


Yes, the benefit is that it’s not an “in-app browser” that is opening, but the real native way is used.

However, the drawback is that the manual step is mandatory, sounds like they’ll fix this.

But I read that the ng-cordova library is likely to adopt a Facebook connection widget.
That would be awesome :smiley:


Already there

But there’s no docs for it yet. Up for making a PR and adding some docs for it?


Good :slight_smile: As soon as I finish my tasks (regarding delay), I will try it.

Thanks :wink:


Nice! just noticed that the facebookConnectPlugin has been updated(or the api has) and now my facebook register function is broken, So i’m gonna check this out right now!

I see ngcordova is also planning to use the facebookConnectPlugin, I had it working once but on each build I had to do a bunch of manual commands in the cli, and whilst i had it working once, I removed and re-added the plugin and now it only works if i follow the code and remove the plugin everytime i wanna test my app,

cordova platform add android

cordova -d plugin add --variable APP_ID="123456789" --variable APP_NAME="myApplication"

android update project --subprojects --path "platforms/android" --target android-19 --library "CordovaLib"

android update project --subprojects --path "platforms/android" --target android-19 --library "FacebookLib"

cd platforms/android/

ant clean

cd FacebookLib

ant clean

open -e AndroidManifest.xml 

// change your minSdkVersion and your targetSdkVersion to your environment settings for me it was:
// <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />

ant release

cd ../../..

cordova build android