Skip to content
This repository was archived by the owner on May 13, 2021. It is now read-only.

zsevic/fb-persistent-menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fb-persistent-menu

CLI tool that adds or removes "Persistent menu" (on Messenger) from Facebook page

⚠️ Prerequisites

  • The person must be running Messenger v106 or above on iOS or Android.
  • The Facebook Page the Messenger bot is subscribed to must be published.
  • The Messenger bot must be set to "public" in the app settings.
  • The Messenger bot must have the pages_messaging permission.

💻 Installation

npm install -g fb-persistent-menu

➡️ Usage

  • add menu - settings are in JSON format

fb-persistent-menu --token <PAGE_ACCESS_TOKEN> --settings '<MENU>'

  • remove menu

fb-persistent-menu --token <PAGE_ACCESS_TOKEN> --remove

fb-persistent-menu --token <PAGE_ACCESS_TOKEN> -r

🚀 Demo

addedPersistentMenu

fb-persistent-menu --token <PAGE_ACCESS_TOKEN> --settings '{
  "persistent_menu": [
    {
      "locale": "default",
      "call_to_actions": [
        {
          "type": "postback",
          "title": "Test",
          "payload": "TEST_PAYLOAD"
        },
        {
          "type": "web_url",
          "title": "Latest News",
          "url": "https://news.ycombinator.com/",
          "webview_height_ratio": "full"
        }
      ]
    }
  ]
}'

About

CLI tool that adds or removes "Persistent menu" (on Messenger) for Facebook page

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •