{ "info": { "author": "Max Tomah", "author_email": "tekillermd@gmail.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": "", "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": "pymessenger3", "package_url": "https://pypi.org/project/pymessenger3/", "platform": "", "project_url": "https://pypi.org/project/pymessenger3/", "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/pymessenger3/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Python Wrapper for Facebook Messenger Platform", "version": "1.0.0" }, "last_serial": 4011182, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ef1bb06d6187de56ed1f12db07b97eac", "sha256": "62feef3bc6ef3ceab65802449c92df84d51f9ad45e2703d3fcf1ed0ffc050374" }, "downloads": -1, "filename": "pymessenger3-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ef1bb06d6187de56ed1f12db07b97eac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8837, "upload_time": "2018-06-28T12:35:41", "url": "https://files.pythonhosted.org/packages/77/2b/f417875610acfc7642c8344d74813b40bce15042e70be4c8b0821707e828/pymessenger3-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef1bb06d6187de56ed1f12db07b97eac", "sha256": "62feef3bc6ef3ceab65802449c92df84d51f9ad45e2703d3fcf1ed0ffc050374" }, "downloads": -1, "filename": "pymessenger3-1.0.0.tar.gz", "has_sig": false, "md5_digest": "ef1bb06d6187de56ed1f12db07b97eac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8837, "upload_time": "2018-06-28T12:35:41", "url": "https://files.pythonhosted.org/packages/77/2b/f417875610acfc7642c8344d74813b40bce15042e70be4c8b0821707e828/pymessenger3-1.0.0.tar.gz" } ] }