Skip to content

An API to fetch facebook user profiles and associate messenger label to them.

License

Notifications You must be signed in to change notification settings

GeekyShacklebolt/pepper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pepper

Build Status codecov

An API to fetch profiles of facebook users using their PSID and associating messenger labels to them.

Prerequisite

  • A facebook page (for utilizing messenger)
  • A facebook app (to implement pepper API)
  • A webhook setup (to get users PSIDs)

You may refer this guide to complete prerequisite.

Now get the pepper

  • git clone https://github.com/geekyshacklebolt/pepper.git
  • cd pepper
  • conda create -n pepper python==3.7.3 pip
  • conda activate pepper
  • pip install -r requirements/development.txt

NOTE: You are free to use any suitable tool for python virtual environment.

Configure a bit

  • touch .env

Please have a look at .env.sample, copy its content to .env file in the project root.

Set it up

  • python manage.py migrate
  • python manage.py check
  • python manage.py run

NOTE: You'll need to create a superuser to access API endpoints.

Creating a superuser is just one command

  • python manage.py createsuperuser --username example_name --email example_email

Basic usage

Please explore endpoints.md to understand valid endpoints with their corresponding requests and responses.

  1. Once you create the page on facebook and get its access_token and page_id, then go to the endpoint /api/page in pepper and feed your facebook page credentials.

  2. Then create a messenger label by using the endpoint /api/label.

  3. Now, send the list of PSIDs and a label identifier (which you want to associate with them) using the endpoint /api/psid.

NOTE: An older version of the same API is available in branch csv of this project that accepts PSID list from a csv file.

Contributors

Shiva Saxena

About

An API to fetch facebook user profiles and associate messenger label to them.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages