facebook-login-service
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Instruction for using Facebbok Login service

step-1 install the library using following command

   npm install facebook-login-service

import the file containg environment variables in app.module.ts, and add it to the providers list providers: [

... ,

{ provide: "environment", useValue: environment }

] ./src/environments/environment.ts

export const environment = { production: false, clientID: { facebook: "Facebook_APP_ID", },

};

Facebook_APP_ID: Fill the ID by Regestring your project on facebook for developers


step-2 import our service in the components


import { FacebookLoginServiceService } from 'facebook-login-service'

create service instance with constructor

constructor( private FacebookLoginServiceService: FacebookLoginServiceService ) {}

Create some function like signIn and in this we call facebook login function. ************Example:********** signIn() { this.FacebookLoginServiceService.signInWithFacebook().then(data => { this.userData = data; }); }

signout() { if (this.FacebookLoginServiceService.signout()) { this.userData = ""; } else { } }


Readme

Keywords

none

Package Sidebar

Install

npm i facebook-login-service

Weekly Downloads

0

Version

0.0.2

License

none

Unpacked Size

57.3 kB

Total Files

26

Last publish

Collaborators

  • raashid_alam