vinsbot

1.0.13 • Public • Published

Facebook chatbot

  • Cài đặt: npm install vinsbot

  • Sử dụng: var vinsbot = require('vinsbot'); var bot = new vinsbot(page_toke);

  • Gửi tin nhắn văn bản: bot.sendMessage(receiver_id, message);

  • Lấy thông tin người gửi: bot.getUserProfile(user_id) .then(user)

  • Tạo menu: bot.addMenu(form)

  • Xóa menu: bot.deleteMenu(form)

  • ví dụ form:
    del_menu: {
        "setting_type":"call_to_actions",
        "thread_state":"existing_thread"
    }
 
    add_menu: {
        "setting_type" : "call_to_actions",
        "thread_state" : "existing_thread",
        "call_to_actions":[
            {
              "type":"postback",
              "title":"Help",
              "payload":"DEVELOPER_DEFINED_PAYLOAD_FOR_HELP"
            },
            {
              "type":"postback",
              "title":"Latest Posts",
              "payload":"DEVELOPER_DEFINED_PAYLOAD_FOR_LATEST_POSTS"
            },
            {
              "type":"web_url",
              "title":"Inbox",
              "url":"http://m.me/lehoangnd"
            }
        ]
    }

Package Sidebar

Install

npm i vinsbot

Weekly Downloads

1

Version

1.0.13

License

ISC

Unpacked Size

5.09 kB

Total Files

4

Last publish

Collaborators

  • hoangsnow9x