Skip to content

zxccxz0119/fbApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

FBApi

Demo: https://zxccxz0119.github.io/example/fbapi.html

Getting Started

<script src="https://zxccxz0119.github.io/assets/fbapi.js"></script>

Usage

<button onClick="login()">login & get info</button> 
<button onClick="fbapi.share('https://www.w3schools.com/')">share</button>
var fbapi = new FBApi({
  appId: 'your_appid',
  version: '', // default is 'v6.0'
})

function login(){
  fbapi.login().then(()=>{
      return fbapi.getProfile()
  }).then((res) => {
      console.log(res)
  })
}

feature

checkStatus

fbapi.checkStatus()

login

fbapi.login()

getProfile

fbapi.getProfile()

share

alertOpen is boolean, default is true.

fbapi.share(link,alertOpen)

Releases

No releases published

Packages

No packages published