Skip to content

Middle ware for login with facebook manual. Made by #VueJS

Notifications You must be signed in to change notification settings

biigpongsatorn/proxy-facebook-login

Repository files navigation

Proxy-facebook-login

A Vue.js project is middle ware for login with facebook.

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

# build for production and view the bundle analyzer report
npm run build --report

Set App ID

# set app id in function statusChangeCallback
let appId = 'YOUR_APP_ID'

# set app id in mounted
window.fbAsyncInit = () => {
  FB.init({
    appId: 'YOUR_APP_ID',
    cookie: true,
    xfbml: true,
    version: 'v2.8'
  })
  FB.getLoginStatus(function (response) {
    vm.statusChangeCallback(response)
  })
}

Usage

# login : redirect your app to..
http://localhost:8080/?action=login&plugin_uri=YOUR_REDIRECT_URL
# logout : redirect your app to..
http://localhost:8080/?action=logout&plugin_uri=YOUR_REDIRECT_URL

Note.

Don't forget to set app domain in your Facebook app.

For detailed explanation on how things work, checkout the guide and docs for vue-loader.

About

Middle ware for login with facebook manual. Made by #VueJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published