Skip to content

hfreire/facebook-login-for-robots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Facebook Login for ๐Ÿค– robots

Coverage Status Known Vulnerabilities Version Downloads

Uses a headless browser to perform a Facebook Login (OAuth dialog) in a Facebook App.

Features

  • Uses Perseverance to add โœ‹ rate limit, ๐Ÿ’ฉ retry and ๐Ÿšฅ circuit breaker behaviour to your requests โœ…
  • Supports Bluebird ๐Ÿฆ promises โœ…

How to install

npm install facebook-login-for-robots

How to use

Use it in your app

Use Facebook Login to get an access token for a Facebook App

const FacebookLogin = require('facebook-login-for-robots')

const facebookLogin = new FacebookLogin({
  facebook: {
    email: 'my-facebook-email-address',
    password: 'my-facebook-passsword'
  },
  // puppeteer: {
  //   headless: false // helpful for troubleshooting
  // }
})

const clientId = 'my-facebook-app-id'
const redirectUri = 'my-facebook-app-redirect-uri'

facebookLogin.oauthDialog(clientId, redirectUri)
  .then(({ facebookAccessToken }) => console.log(facebookAccessToken))
  .catch((error) => console.error(error))

How to contribute

You can contribute either with code (e.g., new features, bug fixes and documentation) or by donating 5 EUR. You can read the contributing guidelines for instructions on how to contribute with code.

All donation proceedings will go to the Sverige fรถr UNHCR, a swedish partner of the UNHCR - The UN Refugee Agency, a global organisation dedicated to saving lives, protecting rights and building a better future for refugees, forcibly displaced communities and stateless people.

Used by

  • get-me-a-date - ๐Ÿ˜ Help me get a ๐Ÿ’˜ date tonight ๐ŸŒ›

License

Read the license for permissions and limitations.