packages feed

fbmessenger-api 0.1.2.0 → 0.1.2.1

raw patch · 3 files changed

+14/−20 lines, 3 filesdep ~servantdep ~servant-clientdep ~servant-server

Dependency ranges changed: servant, servant-client, servant-server

Files

README.md view
@@ -13,22 +13,16 @@  This library is alpha software and the API design could change to improve composability, ergonomicity and ease of use. We recommend using `stack` for dealing with this library (you will need to add it to the `extra-deps` in `stack.yaml`). -<!-- Useful links: -- [servant tutorial](http://haskell-servant.readthedocs.io/en/stable/tutorial)-- [simple python bindings for the messenger api](https://github.com/geeknam/messengerbot)-- [bytemyapp](http://bitemyapp.com/archive.html)-- [aeson tutorial](https://artyom.me/aeson)-- [haskell is easy](https://haskelliseasy.readthedocs.io/en/latest/)-/ -->+NOTE (1.6.2016): the WelcomeMessageSendAPI recently changed. The Platform no-longer accepts any welcome message api-wise (only a custom payload is now allowed). The library will be updated to reflect this change as soon as I can (otherwise you are welcome to submit a PR). To setup/modify the Welcome Message you have to use the online interface.  # Usage -Before being able to test and use the bot, you will need to verify your key. +Before being able to test and use the bot, you will need to verify your key. The example app in `example-app/example.hs` contains a servant server that implements the verification and a trivial echo-server. You can run it with  ```{.bash}-VERIFY_TOKEN="your_token_goes_here" stack exec example  +VERIFY_TOKEN="your_token_goes_here" stack exec example ```  and pass it some data (here assuming you have `httpie` installed)@@ -50,7 +44,7 @@ manager >>= \m -> subscribedApps $ Just token m ``` -You should get a positive response or (in case of inactive token): +You should get a positive response or (in case of inactive token):  ```{.haskell} Left (FailureResponse {responseStatus = Status {statusCode = 400, statusMessage = "Bad Request"}, responseContentType = application/json, responseBody = "{\"error\":{\"message\":\"Invalid OAuth access token.\",\"type\":\"OAuthException\",\"code\":190,\"fbtrace_id\":\"ESxHmUos2B+\"}}"})
fbmessenger-api.cabal view
@@ -1,5 +1,5 @@ name:                fbmessenger-api-version:             0.1.2.0+version:             0.1.2.1 synopsis:            High-level bindings to Facebook Messenger Platform API description:         Please see README.md homepage:            https://github.com/mseri/fbmessenger-api-hs#fbmessenger-api@@ -30,13 +30,13 @@                      , aeson                      , bytestring                      , http-client-                     , servant == 0.7.*-                     , servant-client == 0.7.*+                     , servant >= 0.7.0+                     , servant-client >= 0.7.0                      , text                      , transformers                      , unordered-containers                      -- for Servant.Client.MultipartFormData and interaction with it-                     , http-media         +                     , http-media                      , http-types                      , mime-types                      , string-conversions@@ -55,8 +55,8 @@                     ,  http-client-tls                     ,  fbmessenger-api                     ,  monad-logger-                    ,  servant == 0.7.*-                    ,  servant-server == 0.7.*+                    ,  servant >= 0.7.0+                    ,  servant-server >= 0.7.0                     ,  stm                     ,  text                     ,  transformers
src/Web/FBMessenger/API/Bot/Requests.hs view
@@ -47,10 +47,10 @@     , sendImageMessageRequest     , sendReceiptTemplateMessageRequest     , sendTextMessageRequest-    , setWelcomeButtonTemplateMessageRequest-    , setWelcomeGenericTemplateMessageRequest-    , setWelcomeImageMessageRequest-    , setWelcomeTextMessageRequest+    -- , setWelcomeButtonTemplateMessageRequest+    -- , setWelcomeGenericTemplateMessageRequest+    -- , setWelcomeImageMessageRequest+    -- , setWelcomeTextMessageRequest     , uploadImageMessageRequest     , webUrlButton ) where