Skip to content

A command-line tool to emulate Facebook webhook callbacks

Notifications You must be signed in to change notification settings

Spuffynism/pastaman

Repository files navigation

pastaman

Pastaman emulates Facebook messages sent to a webhook callback url, thus skipping Facebook as the middle-man and saving configuration time.

Why

I got tired of having to configure my changing ngrok facebook webhook callback url every time I started ngrok to publicly expose my local development environment.

Usage

$ ruby pastaman.rb -r <request_name>
$ ruby pastaman.rb -n <hostname> -p <port> -w <webhook_url> -r <request_name>

To see all available flags, see $ ruby pastaman.rb -h

Examples

$ ruby pastaman.rb -r hello_message
$ ruby pastaman.rb -u localhost:8080/facebook/webhook -r text_message
$ ruby pastaman.rb -n localhost -p 8080 -w /facebook/webhook -r photo

Running tests

$ ruby test/all_test.rb
$ ruby test/${file_name}_test.rb

TODO

  • Complete tests

About

A command-line tool to emulate Facebook webhook callbacks

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages