Socket
Socket
Sign inDemoInstall

facebookloginlibrary

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

facebookloginlibrary


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Facebook login libraty

Installation

Using npm:

$ npm i -g npm
$ npm i --save facebookloginlibrary

Using yarn:

$ yarn add facebookloginlibrary

Options:

{
  appId: "your-app-id",
  cookie: true,
  version: "v7.0"
}
// example
import facebookloginlibrary from "facebookloginlibrary";

const fcb = facebookloginlibrary({
  appId: "your-app-id",
  cookie: true,
  version: "v7.0"
});

fcb.init();

document.getElementById('facebook-button').addEventListener('click', async ()=> {
  const loginResponse = await fcb.logInWithFacebook();
});

In Vue.js:

<script>
  import facebookloginlibrary from "facebookloginlibrary";

  export default {
    name: "App",
    data: function(){
      return {
        fcb: null
      }
    },
    components: {},
    computed: {},
    methods: {
      facebookButtonHandler(){
        this.fcb.logInWithFacebook().then(res=>{
          console.log(res);
        });
      }
    },
    created() {
      this.fcb = facebookloginlibrary({
        appId: "your-app-id",
        cookie: true,
        version: "v7.0"
      });

      this.fcb.init();
    }
  };
</script>

Keywords

FAQs

Last updated on 17 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc