Coder Social home page Coder Social logo

facebook-api-puppeteer's Introduction

Installation

git clone https://github.com/bitriddler/messenger-cli
cd messenger-cli
npm install

Quick Start

  1. Install messenger-cli
  2. Copy .env-sample to .env and set
    • FB_EMAIL your login email
    • FB_PASSWORD your login password
    • NICK_NAMES comma separated nick names you go with in chats. This will be used to render "Me:" instead of your chat name.
  3. Run npm start to start the server
  4. Open another terminal and go to the messenger-cli directory to have access to the following commands:

Show visible users

Show a list of the last ~20 users you have chatted with.

npm run cli -- --command=visible-users

Start a chat with a user

This will show you a list of visible users then ask you to enter either the user id or the number of the user in the list

npm run cli -- --command=start-session

Get current chat messages

This will return the visible messages with the current user

npm run cli -- --command=get-session

Send a message to the current chat

This will send a message to the current chat

npm run cli -- --command=send-session "your message goes here"

Usual scenario goes like this

  • Start chat with a user
  • Send a message
  • Get chat messages
npm run cli -- --command=start-session
# When prompted, enter user id or number of user in the list
npm run cli -- --command=send-message "your message"
npm run cli -- --command=get-session
...

Commands are too long?

Copy and paste this in your terminal

alias fv="npm run cli -- --command=visible-users"
alias fss="npm run cli -- --command=start-session"
alias fs="npm run cli -- --command=send-session"
alias fg="npm run cli -- --command=get-session"

Now you can run the above scenario as follows:

fss
# When prompted, enter user id or number of user in the list
fs your message in here
fg
...

Limitations

I created this repository just for fun and there are a lot of limitations you have to know:

  • Only a few emojis will render, the rest will just show :unkown_emoji:
  • Images or any other attachments are ignored

facebook-api-puppeteer's People

Contributors

kareemaly avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.