All Projects → JoabMendes → Fbbotw

JoabMendes / Fbbotw

Licence: mit
Python Wrapper for Facebook Messenger Bot Platform.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Fbbotw

Messenger
Package messenger is used for making bots for use with Facebook messenger
Stars: ✭ 278 (+1753.33%)
Mutual labels:  bot, facebook-messenger
Botkit
Botkit is an open source developer tool for building chat bots, apps and custom integrations for major messaging platforms.
Stars: ✭ 10,555 (+70266.67%)
Mutual labels:  bot, facebook-messenger
Chatblocks
Declarative Messenger chatbot framework
Stars: ✭ 48 (+220%)
Mutual labels:  facebook-messenger, messenger-platform
Messenger Platform Postman Collection
A delicious Postman collection for all your Messenger Platform needs.
Stars: ✭ 150 (+900%)
Mutual labels:  bot, messenger-platform
Node Fb Messenger
✉️ Facebook Messenger Platform Node.js API Wrapper
Stars: ✭ 206 (+1273.33%)
Mutual labels:  wrapper, bot
Messenger4j
A Java library for building Chatbots on the Facebook Messenger Platform - easy and fast.
Stars: ✭ 199 (+1226.67%)
Mutual labels:  bot, messenger-platform
Magento Chatbot
Magento Chatbot Integration with Telegram, Messenger, Whatsapp, WeChat, Skype and wit.ai.
Stars: ✭ 149 (+893.33%)
Mutual labels:  bot, facebook-messenger
facebook-send-api-emulator
Facebook Messenger Emulator & Facebook Send API Emulator functionality allowing you to test web hooks on developer's machine.
Stars: ✭ 24 (+60%)
Mutual labels:  facebook-messenger, messenger-platform
Restfb
RestFB is a simple and flexible Facebook Graph API client written in Java.
Stars: ✭ 681 (+4440%)
Mutual labels:  facebook-messenger, messenger-platform
Thecsebot
Bot user for the slack team of IIT Roorkee, CSE students batch of 2016-20
Stars: ✭ 9 (-40%)
Mutual labels:  bot
Pytelbot
A playful bot in telegram
Stars: ✭ 12 (-20%)
Mutual labels:  bot
Clif
Binding generator to wrap C++ for Python using LLVM.
Stars: ✭ 845 (+5533.33%)
Mutual labels:  wrapper
Telegram Iranbot
🌎 A dead simple Telegram bot for FA to FA, EN to FA translation
Stars: ✭ 9 (-40%)
Mutual labels:  bot
Zonkeynet
RADIO Mesh Network
Stars: ✭ 12 (-20%)
Mutual labels:  bot
Buddywing.defaultcombat
The default combat routine included with BuddyWing, the bot for SWTOR
Stars: ✭ 8 (-46.67%)
Mutual labels:  bot
Ezfn Lobbybot
With EasyFNBot you can easily create you own Fortnite Lobby Bot in less than 5 minutes which will be online forever!
Stars: ✭ 6,875 (+45733.33%)
Mutual labels:  bot
Sulla
👩🏻‍🔬 Javascript Whatsapp api library for chatbots
Stars: ✭ 844 (+5526.67%)
Mutual labels:  bot
Money bot
Docker-containered bot. Added to a group chat, she replies to any message containing price and currency pattern. Live!
Stars: ✭ 8 (-46.67%)
Mutual labels:  bot
Gapbot
Gap Messenger Api Bot Library for Python
Stars: ✭ 15 (+0%)
Mutual labels:  bot
Devrant Randomquotebot
A bot that posts random quotes to devRant everyday
Stars: ✭ 13 (-13.33%)
Mutual labels:  bot

FBBOTW: A Facebook Messenger Platform API Wrapper

Build Status Documentation Status PyPI MIT licensed

This wrapper makes it simpler to user the Facebook Messenger platform wrapping the endpoints as functions.

For exemple, to send a text message to the user you can easily do:

from fbbotw import fbbotw
# ...

user_fbid = "<user fb id>"
my_message = "Hello World"

fbbotw.post_text_message(fbid=user_fbid, message=my_message)
# The user with the specified fbid will receive the text 'Hello World'

This is much less code than the traditional way to call the Send API and send a text. Using requests and json you probably would do like this:

  fbid = "<user psid>"
  message = "Hello World"
  url = 'https://graph.facebook.com/v2.6/me/messages?access_token={0}'
  url = url.format(PAGE_ACCESS_TOKEN)
  header = {"Content-Type": "application/json"}
  payload = {}
  payload['recipient'] = {'id': fbid}
  payload['message'] = {'text': message}
  data = json.dumps(payload)
  response = requests.post(url=url, headers=header, data=data)

Learn more about the fbbotw methods by reading the DOCS

Get Started

1- Install

pip install fbbotw

2 - Configure it

The only configuration needed is to set the PAGE_ACCESS_TOKEN with the value you got from the facebook app dashboard. If you are using Django, create the variable in your settings.py. If not, define the variable in your enviroment:

2.1 - Django

1 - In your settings.py define the variable PAGE_ACCESS_TOKEN that was generated on the app configuration from facebook.

#settings.py
PAGE_ACCESS_TOKEN = "<your access token>"

2.2 - Not Django

Create an os environment variable called PAGE_ACCESS_TOKEN:

export PAGE_ACCESS_TOKEN='<your access token>'

3 - Import and Use it

After setting the access token, just import and use fbbotw methods:

from fbbotw import fbbotw

fbbotw.post_sender_action(fbid="<user psid>", sender_action="typing_on")

See the documentation to learn about the methods provided by the package.

Documentation

Current wrapper covering for the Menssenger Platform 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].