{ "info": { "author": "Charles Crete", "author_email": "charles@cretezy.com", "bugtrack_url": null, "classifiers": [], "description": "pymessenger2 |Build Status|\n===========================\n\nPython Wrapper for `Facebook Messenger\nPlatform `__.\n\n**Disclaimer**: This wrapper is **NOT** an official wrapper and do not\nattempt to represent Facebook in anyway.\n\nAbout\n~~~~~\n\nThis wrapper has the following functions:\n\n- ``send_text_message(recipient_id, message)``\n- ``send_message(recipient_id, message)``\n- ``send_generic_message(recipient_id, elements)``\n- ``send_button_message(recipient_id, text, buttons)``\n- ``send_quick_reply(recipient_id, text, buttons)``\n- ``send_attachment(recipient_id, attachment_type, attachment_path)``\n- ``send_attachment_url(recipient_id, attachment_type, attachment_url)``\n- ``send_image(recipient_id, image_path)``\n- ``send_image_url(recipient_id, image_url)``\n- ``send_audio(recipient_id, audio_path)``\n- ``send_audio_url(recipient_id, audio_url)``\n- ``send_video(recipient_id, video_path)``\n- ``send_video_url(recipient_id, video_url)``\n- ``send_file(recipient_id, file_path)``\n- ``send_file_url(recipient_id, file_url)``\n- ``send_action(recipient_id, action)``\n- ``send_raw(payload)``\n- ``get_user_info(recipient_id)``\n\nYou can see the code/documentation for there in\n`bot.py `__.\n\nThe functions return the full JSON body of the actual API call to\nFacebook.\n\nRegister for an Access Token\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou'll need to setup a `Facebook\nApp `__, Facebook Page, get the\nPage Access Token and link the App to the Page before you can really\nstart to use the Send/Receive service.\n\n`This quickstart guide should\nhelp `__\n\nInstallation\n~~~~~~~~~~~~\n\n.. code:: bash\n\n pip install pymessenger2\n\nUsage\n~~~~~\n\n.. code:: python\n\n from pymessenger2.bot import Bot\n\n bot = Bot(, [optional: app_secret])\n bot.send_text_message(recipient_id, message)\n\n**Note**: From Facebook regarding User IDs\n\n These ids are page-scoped. These ids differ from those returned from\n Facebook Login apps which are app-scoped. You must use ids retrieved\n from a Messenger integration for this page in order to function\n properly.\n\n If ``app_secret`` is initialized, an app\\_secret\\_proof will be\n generated and send with every request. Appsecret Proofs helps\n further secure your client access tokens. You can find out more on\n the `Facebook\n Docs `__\n\nSending a generic template message:\n'''''''''''''''''''''''''''''''''''\n\n `Generic Template\n Messages `__\n allows you to add cool elements like images, text all in a single\n bubble.\n\n.. code:: python\n\n from pymessenger2.bot import Bot\n from pymessenger2 import Element\n bot = Bot()\n elements = []\n element = Element(title=\"test\", image_url=\"\", subtitle=\"subtitle\", item_url=\"http://arsenal.com\")\n elements.append(element)\n\n bot.send_generic_message(recipient_id, elements)\n\nOutput:\n\n.. figure:: https://cloud.githubusercontent.com/assets/68039/14519266/4c7033b2-0250-11e6-81a3-f85f3809d86c.png\n :alt: Generic Bot Output\n\n Generic Bot Output\n\nSending an image/video/file using an URL:\n'''''''''''''''''''''''''''''''''''''''''\n\n.. code:: python\n\n from pymessenger2.bot import Bot\n bot = Bot()\n image_url = \"http://url/to/image.png\"\n bot.send_image_url(recipient_id, image_url)\n\nTodo\n~~~~\n\n- Structured Messages\n- Receipt Messages\n- Airlines\n- Tests!\n\nExample\n~~~~~~~\n\n.. figure:: https://cloud.githubusercontent.com/assets/68039/14516627/905c84ae-0237-11e6-918e-2c2ae9352f7d.png\n :alt: Screenshot of Echo Facebook Bot\n\n Screenshot of Echo Facebook Bot\n\nYou can find an example of an Echo Facebook Bot in ``examples/``\n\n.. |Build Status| image:: https://travis-ci.org/Cretezy/pymessenger2.svg?branch=master\n :target: https://travis-ci.org/Cretezy/pymessenger2", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Cretezy/pymessenger2/archive/v3.1.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Cretezy/pymessenger2", "keywords": "facebook messenger,python,wrapper,bot,messenger bot", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pymessenger2", "package_url": "https://pypi.org/project/pymessenger2/", "platform": "", "project_url": "https://pypi.org/project/pymessenger2/", "project_urls": { "Download": "https://github.com/Cretezy/pymessenger2/archive/v3.1.0.tar.gz", "Homepage": "https://github.com/Cretezy/pymessenger2" }, "release_url": "https://pypi.org/project/pymessenger2/3.1.0/", "requires_dist": null, "requires_python": "", "summary": "Python Wrapper for Facebook Messenger Platform", "version": "3.1.0" }, "last_serial": 3655156, "releases": { "2.0.0": [ { "comment_text": "", "digests": { "md5": "da777a040900c5598d05f3a3cb7a1e2e", "sha256": "5c9a88b66a2a3473e44703e28ef6dafd5f3a6600b73c3f93afc90101f9f92c80" }, "downloads": -1, "filename": "pymessenger2-2.0.0.tar.gz", "has_sig": false, "md5_digest": "da777a040900c5598d05f3a3cb7a1e2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3730, "upload_time": "2017-02-20T16:21:19", "url": "https://files.pythonhosted.org/packages/36/63/72a9738b43c1a174bf108d9a8c07d81012c757b567df52b0979ff96f60c5/pymessenger2-2.0.0.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "a5891ccc2de41333fff6de76e8967b08", "sha256": "9cea9f0dc31821c6a41ee8c7aec520840c0977ba76312cd73971776ea7dc70df" }, "downloads": -1, "filename": "pymessenger2-3.0.0.tar.gz", "has_sig": false, "md5_digest": "a5891ccc2de41333fff6de76e8967b08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6886, "upload_time": "2017-05-15T13:57:59", "url": "https://files.pythonhosted.org/packages/b7/0f/4b828081362a91dbdbeda244de010abb44ba2e7d491f35b7e27a84ff6dd3/pymessenger2-3.0.0.tar.gz" } ], "3.0.3": [ { "comment_text": "", "digests": { "md5": "1a83102759770e806b0c032515047a29", "sha256": "8c1f94c29e96601574e541167844d39a1503ee203e121c8fd7ed260e36d672bb" }, "downloads": -1, "filename": "pymessenger2-3.0.3.tar.gz", "has_sig": false, "md5_digest": "1a83102759770e806b0c032515047a29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6887, "upload_time": "2017-05-15T14:07:07", "url": "https://files.pythonhosted.org/packages/a3/79/320f10ffb8b978d336da5b7c155857678b2325af6e928ab60bc5a6a61a03/pymessenger2-3.0.3.tar.gz" } ], "3.0.5": [ { "comment_text": "", "digests": { "md5": "75d1b26a923647ea2ed754f43ab00fc4", "sha256": "2d0acf4fceb75cf05de8ec83eed179a99ee4364252e754615e2aa0ccde82f732" }, "downloads": -1, "filename": "pymessenger2-3.0.5.tar.gz", "has_sig": false, "md5_digest": "75d1b26a923647ea2ed754f43ab00fc4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6962, "upload_time": "2017-05-15T14:16:59", "url": "https://files.pythonhosted.org/packages/37/9f/678371fa783bbf237a3dc100e1ae83f1b36aeb2ba460674a125c5c8b693f/pymessenger2-3.0.5.tar.gz" } ], "3.1.0": [ { "comment_text": "", "digests": { "md5": "6e135f982a0889caca44d0467163ffb6", "sha256": "6964fa6d95cdcb6be4f54209e5b3270a79502ec5cdb27ba67673b3ae28343b72" }, "downloads": -1, "filename": "pymessenger2-3.1.0.tar.gz", "has_sig": false, "md5_digest": "6e135f982a0889caca44d0467163ffb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8764, "upload_time": "2018-03-09T18:06:33", "url": "https://files.pythonhosted.org/packages/b8/06/3d31df36881475dbf8001a1bc690c76dffc7c11575bdde22595ad29e7784/pymessenger2-3.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6e135f982a0889caca44d0467163ffb6", "sha256": "6964fa6d95cdcb6be4f54209e5b3270a79502ec5cdb27ba67673b3ae28343b72" }, "downloads": -1, "filename": "pymessenger2-3.1.0.tar.gz", "has_sig": false, "md5_digest": "6e135f982a0889caca44d0467163ffb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8764, "upload_time": "2018-03-09T18:06:33", "url": "https://files.pythonhosted.org/packages/b8/06/3d31df36881475dbf8001a1bc690c76dffc7c11575bdde22595ad29e7784/pymessenger2-3.1.0.tar.gz" } ] }