Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

laminko/fb_accountkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fb_accountkit

A simple python module for Facebook's AccountKit server-side implementations.

Dependencies

Installation

pip install fb-accountkit

Usage

from fb_accountkit import FBAccountKit

fbak = FBAccountKit(
    'APP_ID',
    'APP_secret',
    version='v1.1'
)

# store token (user_access_token) to response back to client.
token_info = fbak.retrieve_user_access_token('auth_code_from_client')

# to validate token, call `get_user_session()`
print(fbak.get_user_session())

# to logout the user
fbak.logout()

# to logout all sessions (account_id must be provided)
me = fbak.get_user_session()
fbak.logout_all_sessions(me.get('id'))