GithubHelp home page GithubHelp logo

gilbertobotaro / ionic2-native-facebook-login Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fuffenz/ionic2-native-facebook-login

0.0 1.0 0.0 996 KB

Ionic2 app to show how to use native Facebook sign-in

JavaScript 63.94% HTML 9.92% CSS 26.14%

ionic2-native-facebook-login's Introduction

ionic2-native-facebook-login

A simple app to show how to use native Facebook sign-in in Ionic 2.

Installation

I assume that you know how to build an Ionic2 app and that you have registered your Facebook app with Facebook and have an APP_ID and APP_NAME https://developers.facebook.com/apps.

Clone this repo:

$ git clone [email protected]:fuffenz/ionic2-native-facebook-login.git

CD into your new folder

$ cd ionic2-native-facebook-login

Add a cordova plugin for Facebook SDK. Make sure to use your own APP_ID and APP_NAME:

$ cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApp"

Add inappbrowser. If your app is used on a phone without the Facebook app, authorization will happen in a browser.

$ cordova plugin add --save cordova-plugin-inappbrowser

Add the Cordova whitelist to make sure your app can talk to other sites. Notice that there is also a Content-Security-Policy in index.html. The one in this demo allows pretty much anything.

$ cordova plugin add --save cordova-plugin-whitelist 

Add your platform

$ ionic platform add android 

Finally, update node modules, build your app and run it on a device.

$ npm install
$ ionic build android
$ ionic run android    

YES. You need to run it on a device. NO, you can NOT test this in a browser with "ionic serve".

ionic2-native-facebook-login's People

Contributors

fuffenz avatar

Watchers

Gilberto Botaro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.