New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

messenger-cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

messenger-cli

Send messages from a Facebook Messenger bot account CLI

latest
Source
npmnpm
Version
0.1.2
Version published
Maintainers
1
Created
Source

messenger-cli

Send messages from a Facebook Messenger bot account CLI

Installation

npm install messenger-cli -g

Usage

Finding your user ID

Every user ID is different per Messenger app, this means that you need to find yours before you can start sending messages. I've created a simple webhook script that you can deploy to Heroku to find your ID.

Setting the access token

messenger -t <token>

It is required that you set your access token and default user ID to send a message.

Setting the default recipient

messenger -r <user id>

Typing out and remembering the user ID is annoying, you can set a default user ID by using the -r flag by itself.

Sending a message

messenger -r <user id> -m <message>

Sending a message to the default recipient

messenger -m <message>

Sending a message without the -r flag will be sent to the default user.

Use Cases

Command line

$ dd if=image.img of=/dev/rdisk1; messenger -m "Disk write complete"

$ wget ubuntu.com/image.img; messenger -m "Ubuntu finished downloaded"

$ make; make install; messenger -m "Software compiled and installed"

In software

Because it's CLI, it can be used in all projects.

# Python script checking a server's status
while True:
  if server_up() == False:
    os.system('messenger -m "The server has gone down"')
  time.sleep(900)

If you've found a great use case yourself, tweet me at @hstntn, I'm super interested.

FAQs

Package last updated on 25 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts