# Native Facebook Login

**URL:** <https://forum.ionicframework.com/t/native-facebook-login/25584>\
**Category:** cordova\
**Created:** [June 1, 2015, 6:47am UTC](https://forum.ionicframework.com/t/native-facebook-login/25584 "2015-06-01T06:47:23Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![allenhercules](https://avatars.discourse-cdn.com/v4/letter/a/b77776/32.png) [@allenhercules](https://forum.ionicframework.com/u/allenhercules)\
**Post date:** [June 1, 2015, 6:47am UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/1 "2015-06-01T06:47:23Z")

</div>

Hello everyone,

My Ionic app currently uses Firebase Social Authentication to log users into the app. The authentication is displayed in the Inapp browser. However, I want to use the native Facebook app on the user’s device to authenticate them (if they have the app) and to fallback to the browser version if they do not. I know of the ngCordova Facebook plugin but the documentation is not really good.  
Does anyone know good resources that would teach me how to properly use this plugin? Or is there an alternative plugin?  
Thank you everyone.

---

<div class="post-metadata">

**Author:** ![aboudard](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/aboudard/32/66805_2.png) [@aboudard](https://forum.ionicframework.com/u/aboudard)\
**Post date:** [June 1, 2015, 8:27am UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/2 "2015-06-01T08:27:49Z")

</div>

Hello,  
I’m interested in this too, since I now use the oAuth ngCordova plugin, and I found out that you can’t access friends list of the current user with the graph API ☹  
The tricky part is to check whether Facebook native is installed or not.

---

<div class="post-metadata">

**Author:** ![siddhartha](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@siddhartha](https://forum.ionicframework.com/u/siddhartha)\
**Post date:** [June 1, 2015, 10:26am UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/3 "2015-06-01T10:26:35Z")

</div>

Hey! I have created a starter template for the sole purpose of integrating Native Facebook and Native Google login. Check it out on github. It has complete instructions on how to set up Google and Facebook auth.

> **[srameshr/ionic-starter-oauth](https://github.com/srameshr/ionic-starter-oauth)**
>
> ionic-starter-oauth - Ionic starter template that includes Facebook and Google open auth login through native facebook and google apps.

---

<div class="post-metadata">

**Author:** ![TimmyCarbone](https://avatars.discourse-cdn.com/v4/letter/t/2bfe46/32.png) [@TimmyCarbone](https://forum.ionicframework.com/u/TimmyCarbone)\
**Post date:** [June 13, 2015, 8:12pm UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/4 "2015-06-13T20:12:55Z")

</div>

Awesome @siddhartha , can’t wait to try it to replace my Facebook web login setup.  
Will tell you how it went !

---

<div class="post-metadata">

**Author:** ![Kanun](https://avatars.discourse-cdn.com/v4/letter/k/f08c70/32.png) [@Kanun](https://forum.ionicframework.com/u/Kanun)\
**Post date:** [July 8, 2015, 2:33pm UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/5 "2015-07-08T14:33:10Z")

</div>

Hello siddhartha

thanks for posting this, but i am struggling to implement this. Despite that i checked the demo apk and the facebook login is painfully slow.

---

<div class="post-metadata">

**Author:** ![siddhartha](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@siddhartha](https://forum.ionicframework.com/u/siddhartha)\
**Post date:** [July 22, 2015, 3:50pm UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/6 "2015-07-22T15:50:24Z")

</div>

hey sorry for the late reply. Did you have any success with this?

---

<div class="post-metadata">

**Author:** ![viliusk](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/viliusk/32/90815_2.png) [@viliusk](https://forum.ionicframework.com/u/viliusk)\
**Post date:** [August 18, 2015, 7:22am UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/7 "2015-08-18T07:22:20Z")

</div>

Could anyone post how to integrate these logins from ionic-starter-oauth to my own application?

---

<div class="post-metadata">

**Author:** ![siddhartha](https://avatars.discourse-cdn.com/v4/letter/s/bc79bd/32.png) [@siddhartha](https://forum.ionicframework.com/u/siddhartha)\
**Post date:** [August 18, 2015, 6:37pm UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/8 "2015-08-18T18:37:45Z")

</div>

Sure no problem. Can you share the code?

---

<div class="post-metadata">

**Author:** ![dipak\_mahapurkar](https://avatars.discourse-cdn.com/v4/letter/d/45deac/32.png) [@dipak\_mahapurkar](https://forum.ionicframework.com/u/dipak_mahapurkar)\
**Post date:** [April 20, 2016, 6:57am UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/9 "2016-04-20T06:57:57Z")

</div>

Hello @srameshr,  
I am trying to follow your steps but i get this error at installation of plugins

cordova -d plugin add /Users/Desktop/Ionic 2 Demo/phonegap-facebook-plugin --variable APP\_ID=“App\_id” --variable APP\_NAME=“App\_name”

Executing “before\_plugin\_add” hook for all plugins.  
No version specified, retrieving version from config.xml  
No version given in config.xml, attempting to use plugin engine info  
Error: Registry returned 404 for GET on [https://registry.npmjs.org/ionic-oauth](https://registry.npmjs.org/ionic-oauth)  
at makeError (/usr/local/lib/node\_modules/cordova/node\_modules/npm/node\_modules/npm-registry-client/lib/request.js:264:12)  
at CachingRegistryClient. (/usr/local/lib/node\_modules/cordova/node\_modules/npm/node\_modules/npm-registry-client/lib/request.js:242:14)  
at Request.\_callback (/usr/local/lib/node\_modules/cordova/node\_modules/npm/node\_modules/npm-registry-client/lib/request.js:172:14)  
at Request.self.callback (/usr/local/lib/node\_modules/cordova/node\_modules/npm/node\_modules/request/request.js:199:22)  
at emitTwo (events.js:100:13)  
at Request.emit (events.js:185:7)  
at Request. (/usr/local/lib/node\_modules/cordova/node\_modules/npm/node\_modules/request/request.js:1036:10)  
at emitOne (events.js:95:20)  
at Request.emit (events.js:182:7)  
at IncomingMessage. (/usr/local/lib/node\_modules/cordova/node\_modules/npm/node\_modules/request/request.js:963:12)

please help me.  
Thank You !!

---

<div class="post-metadata">

**Author:** ![ofirgranot](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ofirgranot/32/114522_2.png) [@ofirgranot](https://forum.ionicframework.com/u/ofirgranot)\
**Post date:** [November 2, 2017, 11:58am UTC](https://forum.ionicframework.com/t/native-facebook-login/25584/10 "2017-11-02T11:58:40Z")

</div>

Yep you right Kanun when I run the Facebook login demo on my LG G4 device it is very very slow but when I execute it on the browser its not slow, did you resolve this issue?
