{ "info": { "author": "Joabe Mendes", "author_email": "joabe.mdl@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Build Tools", "Topic :: Software Development :: Libraries" ], "description": "# FBBOTW: A [Facebook Messenger](https://developers.facebook.com/products/messenger/) Platform API Wrapper\n\n[![Build Status](https://travis-ci.org/JoabMendes/fbbotw.svg?branch=master)](https://travis-ci.org/JoabMendes/fbbotw) [![Documentation Status](https://readthedocs.org/projects/fbbotw/badge/?version=latest)](http://fbbotw.readthedocs.io) [![PyPI](https://img.shields.io/pypi/v/fbbotw.svg)](https://pypi.python.org/pypi?name=fbbotw&:action=display) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/hyperium/hyper/master/LICENSE) \n\n\nThis wrapper makes it simpler to user the *Facebook Messenger platform* wrapping the endpoints as functions.\n\nFor exemple, to send a text message to the user you can easily do:\n\n```python\nfrom fbbotw import fbbotw\n# ...\n\nuser_fbid = \"\"\nmy_message = \"Hello World\"\n\nfbbotw.post_text_message(fbid=user_fbid, message=my_message)\n# The user with the specified fbid will receive the text 'Hello World'\n\n```\n\nThis 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:\n\n```python\n fbid = \"\"\n message = \"Hello World\"\n url = 'https://graph.facebook.com/v2.6/me/messages?access_token={0}'\n url = url.format(PAGE_ACCESS_TOKEN)\n header = {\"Content-Type\": \"application/json\"}\n payload = {}\n payload['recipient'] = {'id': fbid}\n payload['message'] = {'text': message}\n data = json.dumps(payload)\n response = requests.post(url=url, headers=header, data=data)\n```\n\nLearn more about the fbbotw methods by reading the [DOCS](http://fbbotw.readthedocs.io/en/latest/)\n\n## Get Started\n\n### 1- Install\n\n```bash\npip install fbbotw\n```\n\n### 2 - Configure it\n\nThe only configuration needed is to set the `PAGE_ACCESS_TOKEN` with\nthe value you got from the [facebook app dashboard](https://developers.facebook.com/docs/messenger-platform/guides/setup#page_access_token). If you are using Django, create the variable in your `settings.py`. If not, define the variable in your enviroment:\n\n#### 2.1 - Django\n\n1 - In your `settings.py` define the variable `PAGE_ACCESS_TOKEN` that was \ngenerated on the app configuration from facebook.\n\n```python\n#settings.py\nPAGE_ACCESS_TOKEN = \"\"\n```\n\n#### 2.2 - Not Django\n\nCreate an **os environment** variable called `PAGE_ACCESS_TOKEN`:\n\n```bash\nexport PAGE_ACCESS_TOKEN=''\n```\n\n### 3 - Import and Use it\n\nAfter setting the access token, just import and use `fbbotw` methods:\n\n```python\nfrom fbbotw import fbbotw\n\nfbbotw.post_sender_action(fbid=\"\", sender_action=\"typing_on\")\n\n```\n\nSee the documentation to learn about the methods provided by the package.\n\n# Documentation\n\n- [Read the Docs](http://fbbotw.readthedocs.io/en/latest/)\n\n# Current wrapper covering for the [Menssenger Platform 2.0](https://developers.facebook.com/docs/messenger-platform/product-overview)\n\n\n- [ ] Send API\n - [x] Content Types\n - [x] [Text messages](https://developers.facebook.com/docs/messenger-platform/send-api-reference/text-message)\n - [x] [Audio attachment](https://developers.facebook.com/docs/messenger-platform/send-api-reference/audio-attachment)\n - [x] [Image attachment](https://developers.facebook.com/docs/messenger-platform/send-api-reference/image-attachment)\n - [x] [Video attachment](https://developers.facebook.com/docs/messenger-platform/send-api-reference/video-attachment)\n - [x] [File attachment](https://developers.facebook.com/docs/messenger-platform/send-api-reference/file-attachment)\n - [x] [Quick Replies](https://developers.facebook.com/docs/messenger-platform/send-api-reference/quick-replies)\n - [x] [Sender Actions](https://developers.facebook.com/docs/messenger-platform/send-api-reference/sender-actions)\n - [x] [Attachment Upload API](https://developers.facebook.com/docs/messenger-platform/send-api-reference/attachment-upload)\n - [ ] Templates\n - [x] [Button Template](https://developers.facebook.com/docs/messenger-platform/send-api-reference/button-template)\n - [x] [Generic Template](https://developers.facebook.com/docs/messenger-platform/send-api-reference/generic-template)\n - [x] [List Template](https://developers.facebook.com/docs/messenger-platform/send-api-reference/list-template)\n - [x] [Receipt Template](https://developers.facebook.com/docs/messenger-platform/send-api-reference/receipt-template)\n - [x] [Media Template](https://developers.facebook.com/docs/messenger-platform/send-messages/template/media)\n - [ ] Open Graph Template\n - [ ] Airline Boarding Pass Template\n - [ ] Airline Checkin Template\n - [ ] Airline Itinerary Template\n - [ ] Airline Flight Update Template\n - [x] [Buttons: Check documentation to format your buttons in your templates](https://developers.facebook.com/docs/messenger-platform/send-api-reference/buttons)\n - [x] [Call Button](https://developers.facebook.com/docs/messenger-platform/send-api-reference/call-button)\n- [ ] Miscellaneous\n - [x] [User profile](https://developers.facebook.com/docs/messenger-platform/user-profile)\n - [x] Messenger Profile API\n - [x] [Persistent Menu](https://developers.facebook.com/docs/messenger-platform/messenger-profile/persistent-menu)\n - [x] [Get Started Button](https://developers.facebook.com/docs/messenger-platform/messenger-profile/get-started-button)\n - [x] [Greeting Text](https://developers.facebook.com/docs/messenger-platform/messenger-profile/greeting-text)\n - [x] [Domain Whitelisting](https://developers.facebook.com/docs/messenger-platform/messenger-profile/domain-whitelisting)\n - [x] [Account Linking](https://developers.facebook.com/docs/messenger-platform/messenger-profile/account-linking-url)\n - [x] [Payment Settings](https://developers.facebook.com/docs/messenger-platform/messenger-profile/payment-settings)\n - [x] [Target Audience](https://developers.facebook.com/docs/messenger-platform/messenger-profile/target-audience)\n - [x] [Chat Extension Home URL (Covering but no tested)](https://developers.facebook.com/docs/messenger-platform/messenger-profile/home-url)\n - [ ] Plugin Reference\n - [ ] Messenger Code API\n - [ ] Messaging Insights API\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/JoabMendes/fbbotw", "keywords": "facebook bot mensseger platform wrapper django", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "fbbotw", "package_url": "https://pypi.org/project/fbbotw/", "platform": "", "project_url": "https://pypi.org/project/fbbotw/", "project_urls": { "Homepage": "https://github.com/JoabMendes/fbbotw" }, "release_url": "https://pypi.org/project/fbbotw/2.2.1/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "Python/Django Wrapper for Facebook Messenger Bot Platform.", "version": "2.2.1" }, "last_serial": 4342186, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "67d26a644ea55e563f77e4223c962cb5", "sha256": "b3bda6a701fd111b845487ae1ff22fdeb0a28a1b595ac38d763ce1f27f3a4701" }, "downloads": -1, "filename": "fbbotw-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "67d26a644ea55e563f77e4223c962cb5", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 10344, "upload_time": "2016-12-02T00:05:34", "url": "https://files.pythonhosted.org/packages/6c/57/a1799493c55acfe1840a50fbd519e50b7540cf0874f39140941c2f356d8f/fbbotw-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "733d09435a3818c8ce5e1d825f93c04b", "sha256": "59138c36d9f4a732e4d7fee8c6ebdd65e33137c4e2a863ef60668ac010312f7c" }, "downloads": -1, "filename": "fbbotw-1.0.0.tar.gz", "has_sig": false, "md5_digest": "733d09435a3818c8ce5e1d825f93c04b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9921, "upload_time": "2016-12-02T00:05:31", "url": "https://files.pythonhosted.org/packages/6c/66/8937c608705288399e61a81496e4b9e5c174559091c8e1f3e796bb665e22/fbbotw-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "6d98cf7758f83a85422e794ffd8c4ba0", "sha256": "0a680effe4ebf52f2968441cee01db0fa8c7848f6c6ae74affb4c209fdd94c4c" }, "downloads": -1, "filename": "fbbotw-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6d98cf7758f83a85422e794ffd8c4ba0", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 15954, "upload_time": "2017-06-21T00:59:25", "url": "https://files.pythonhosted.org/packages/5b/88/1b54ef7cd4bc23af8d3123cfc311c709405d5d2144445756561d28eed723/fbbotw-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df8ed5380184c3ba8f8d0c06856ae327", "sha256": "d2aee4444207391d8b44524bd86db6c1208d0b7eb3064b22e5d4832ac753960a" }, "downloads": -1, "filename": "fbbotw-2.0.0.tar.gz", "has_sig": false, "md5_digest": "df8ed5380184c3ba8f8d0c06856ae327", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16800, "upload_time": "2017-06-21T00:59:23", "url": "https://files.pythonhosted.org/packages/e5/f4/454d1f511419b20e7c7677c27fb4a5914e7d97b3484bc490b7f6b87841f6/fbbotw-2.0.0.tar.gz" } ], "2.1.6": [ { "comment_text": "", "digests": { "md5": "28951aa3bf4db91fc77f263496be6f27", "sha256": "bdd3fe0f60e38af08391e47c0d6f616cd18178386cf36454f035ff48a22c586b" }, "downloads": -1, "filename": "fbbotw-2.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "28951aa3bf4db91fc77f263496be6f27", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13487, "upload_time": "2018-04-04T21:24:57", "url": "https://files.pythonhosted.org/packages/87/9a/590b37c35b6a2a3f02a541102fefaccb1b36ba44d134085ff3f4da30fc54/fbbotw-2.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "19a262b4d0e099b6d048cee5a187935d", "sha256": "05122ac441e316a6b06d0b676a241bb5a539400cd81f83c542a758740720f2b1" }, "downloads": -1, "filename": "fbbotw-2.1.6.tar.gz", "has_sig": false, "md5_digest": "19a262b4d0e099b6d048cee5a187935d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17020, "upload_time": "2018-04-04T21:25:11", "url": "https://files.pythonhosted.org/packages/72/e7/13956742a1103e84cee50c4a238c804c04e3dcadd4f817ae743470ea6755/fbbotw-2.1.6.tar.gz" } ], "2.2.1": [ { "comment_text": "", "digests": { "md5": "1cb3e1449be4bda7e497968375dd6363", "sha256": "c0a89ee56e3e08842dad26f939c1c4fdb154154fc6e2ad1c036f85d0b608b192" }, "downloads": -1, "filename": "fbbotw-2.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1cb3e1449be4bda7e497968375dd6363", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13508, "upload_time": "2018-10-04T22:43:27", "url": "https://files.pythonhosted.org/packages/32/e9/01d71f1c2321dda2f9a516fe3722425c526469d3aa8d1cd4229d827a9766/fbbotw-2.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a351ee4c46ec51b69f26fb81eca52561", "sha256": "92650c9caa256a51014537b3d96e07dd15f7c07d6a53c6330bf11fc7997d40f0" }, "downloads": -1, "filename": "fbbotw-2.2.1.tar.gz", "has_sig": false, "md5_digest": "a351ee4c46ec51b69f26fb81eca52561", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17047, "upload_time": "2018-10-04T22:43:29", "url": "https://files.pythonhosted.org/packages/0f/bf/df4a0a1de6d8a5d6779ce6fd6cbe4e78a1e7b8563e90786251b7d9fd75df/fbbotw-2.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1cb3e1449be4bda7e497968375dd6363", "sha256": "c0a89ee56e3e08842dad26f939c1c4fdb154154fc6e2ad1c036f85d0b608b192" }, "downloads": -1, "filename": "fbbotw-2.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1cb3e1449be4bda7e497968375dd6363", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 13508, "upload_time": "2018-10-04T22:43:27", "url": "https://files.pythonhosted.org/packages/32/e9/01d71f1c2321dda2f9a516fe3722425c526469d3aa8d1cd4229d827a9766/fbbotw-2.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a351ee4c46ec51b69f26fb81eca52561", "sha256": "92650c9caa256a51014537b3d96e07dd15f7c07d6a53c6330bf11fc7997d40f0" }, "downloads": -1, "filename": "fbbotw-2.2.1.tar.gz", "has_sig": false, "md5_digest": "a351ee4c46ec51b69f26fb81eca52561", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17047, "upload_time": "2018-10-04T22:43:29", "url": "https://files.pythonhosted.org/packages/0f/bf/df4a0a1de6d8a5d6779ce6fd6cbe4e78a1e7b8563e90786251b7d9fd75df/fbbotw-2.2.1.tar.gz" } ] }