1
0
mirror of synced 2024-11-24 05:46:07 +03:00
Commit Graph

161 Commits

Author SHA1 Message Date
Samuel El-Borai
73b91a659d Fix example to build with latest version of the library 2018-03-10 07:02:16 +01:00
xuefeng Huang
525ba1bedc added messaging_type for FB send API request (#37)
* added messaging_type for FB send API request

* added note in readme
2018-02-06 13:15:36 +11:00
DeziderMesko
2a76034a05 Correct content-type for attachments (#33)
* fixed error return value

* content-type correctly set
2017-07-31 19:57:34 -07:00
DeziderMesko
5d938afef2 fixed error return value (#32) 2017-07-31 12:24:49 -07:00
Ramy Aboul Naga
7b303129b9 Adds integrity check (#19) (#30)
* Adds integrity check (#19)

* Replace usage of `flag' with `configure' for `port' arg.

	Usage:
		./main               # Default port 8080
		./main  --port=1234  # Custom port 1234
2017-06-27 19:10:34 -07:00
Wilson Wang
64c15a121b Reuse Post Code (#28)
* add json omitempty on button Title field

Share Button only allows the Type field to be presented in the serialized data. Otherwise, you got facebook error:

"Facebook error : (#100) Param [elements][0][buttons][0][title] must be a non-empty UTF-8 encoded string"

* add attachement to senddata

* changes after pull request reviews

* add PostToMessenger method and ensure the result check in it

* change the function name
2017-04-09 09:58:35 -07:00
Michele Gargiulo
66c2f90a07 Adds missing properties for web_url button in StructuredMessageButton. (#29)
* Adds the Referral webhook and PostBacks's referral structure

* Adds missing properties for web_url button in StructuredMessageButton.
See https://developers.facebook.com/docs/messenger-platform/send-api-reference/url-button

* Fixes the type of StructuredMessageButton.MessengerExtensions
2017-04-09 09:56:54 -07:00
Wilson Wang
74b5cbe4ac Add AttachmentWithReplies method for sending attachment together with replies. (#27)
* add json omitempty on button Title field

Share Button only allows the Type field to be presented in the serialized data. Otherwise, you got facebook error:

"Facebook error : (#100) Param [elements][0][buttons][0][title] must be a non-empty UTF-8 encoded string"

* add attachement to senddata

* changes after pull request reviews
2017-03-15 10:29:26 -07:00
Michele Gargiulo
bbd304b464 Adds the Referral webhook and PostBacks's referral structure (#26) 2017-02-16 18:29:12 -08:00
Wilson Wang
998c23c3e9 add json omitempty on button Title field (#25)
Share Button only allows the Type field to be presented in the serialized data. Otherwise, you got facebook error:

"Facebook error : (#100) Param [elements][0][buttons][0][title] must be a non-empty UTF-8 encoded string"
2017-02-06 08:05:01 -08:00
Aman Mangal
d8d9b9886f Update timezone to be of float type (#24)
* Update timezone to be of float type

Reference: https://developers.facebook.com/docs/graph-api/reference/user
Fixes #23

* Update README
2017-01-23 09:23:21 -08:00
Depado
87975a1970 Add missing fields of CallToActionItem (#22)
* Adding WebViewHeightRatio and MessengerExtension fields

* Adding constants and documentation
2016-12-09 21:04:14 +11:00
Machiel
a5faf5be5c Add method to handle OptIn messages (#21) 2016-12-09 07:52:21 +11:00
Bo-Yi Wu
fc8cdbb86f Fix typo (#20) 2016-11-27 20:22:11 +11:00
Trey Richards
12da86e59e Add AttachmentData method (#18) 2016-11-11 14:28:32 +11:00
Depado
40fe2bc6f0 Fix project URL (#17) 2016-11-05 11:04:39 +11:00
Bo-Yi Wu
39df036128 Add support for sending attachments by a URL (#15) 2016-10-09 14:28:21 +11:00
Depado
6970a1b09a Correctly handle Facebook errors (#14)
* Sending back the error message of Facebook as an error for some function calls

* Adding error handling for other function calls

* Private function to parse Facebook's response

* Handling errors for ProfileByID function
2016-10-08 00:28:27 +11:00
Depado
79275a89fd Fixin timestamp handling as Facebook sends back milliseconds timestamps (#12) 2016-10-04 12:44:18 +11:00
Harrison Shoebridge
387e9a1083 Fix projects list 2016-09-28 19:28:12 +10:00
Bo-Yi Wu
5f6d5a9b23 Add example project list (#11) 2016-09-28 19:23:56 +10:00
Bo-Yi Wu
2db24269ec Add Send func for sending a message to a user (#10)
Fixes #6.
2016-09-23 07:49:05 +10:00
Harrison
f3642f1e87 Fix profile fields not being entirely populated 2016-09-18 14:13:02 +10:00
Harrison Shoebridge
64af85d686 Merge pull request #9 from muxx/master
Several improvements of messenger.
2016-09-12 20:45:46 +10:00
Ilyas Salikhov
ecac8ff045 Added the new breaking change in README 2016-09-11 22:51:57 +03:00
Ilyas Salikhov
f7a3ef787f * Added ability to set greeting setting, get started setting and persistent menu setting
* Added IsEcho in Message which is indicator of own messages
* Added QuickReply in Message for sending of quick reply buttons with message
* Added mux parameter in Messenger constructor. It is useful when single go app processes the several bots
* Added Messenger.SenderAction which allows to show writing and reading status
* Added Messenger.GreetingSetting and Messenger.CallToActionsSetting which allow to set the bot settings
* Fixed bug with nil returning instead of error object
2016-09-11 22:49:56 +03:00
Thach Le
500eec9f3b Fix wrong function handle read (#8) 2016-08-19 19:47:04 +10:00
Bruce Fitzsimons
de3a5d0949 Add Read event support. Update description of Delivered events (#7)
* Added Read message support
Delivered message suppport already existed but was commented as
indicating that a message was read by a user. As of the 1 July
2016 API release this isn't true, there is another event. This
commit adds read event support and corrects the description of
delivered events. Also added to the example bot.

* go fmt

* Added new profile fields from July 1st API update

* gofmt
2016-08-18 09:41:25 +10:00
Garry POUPIN
5a7a8679ad Add Replies feature (#5)
* add replies payload and method

* clean comment

* improve TextWithReplies and  spelling correction

* fix last typo
2016-07-08 23:49:35 +10:00
Harrison
f5aa0f8e1c Fix formatting 2016-05-20 09:31:15 +10:00
Harrison
d3d026cb3a Add breaking changes note 2016-05-20 09:25:21 +10:00
Harrison
681541d027 Parse IDs as strings
Facebook changed their API to use strings instead of ints for IDs due to
some node.js limitation.

Fix #4
2016-05-20 09:18:44 +10:00
Harrison
1dc4bcc67d Add "/" as default WebhookURL
This is because an empty string is *invalid* in net/http and will yield
a panic.
2016-05-20 09:18:01 +10:00
Harrison
036b286d6b Fix styling 2016-05-04 18:09:34 +10:00
Panich Maxim
09dbfd4b26 Println clear 2016-05-03 16:53:14 +03:00
Panich Maxim
eb0e72a5dc Api update
Postback action handler
Dynamic WebHook
Button Template Message
Generic Template Message
2016-05-03 16:42:25 +03:00
Harrison
494b974cb2 Add auto-verify 2016-04-18 20:04:41 +10:00
Harrison Shoebridge
f8da84d8c9 Add image sending 2016-04-16 18:01:32 +10:00
Harrison
f028054eeb Add link to example 2016-04-15 10:41:03 +10:00
Harrison
ceec3c0a6b Add comments 2016-04-15 10:34:10 +10:00
Harrison
cba1831ce3 Fix broken link 2016-04-15 10:33:50 +10:00
Harrison
2868633076 Update README 2016-04-15 10:26:04 +10:00
Harrison
d5a010c736 Add profile retrieving 2016-04-15 10:21:08 +10:00
Harrison Shoebridge
9618f8790f Add tips 2016-04-14 20:10:40 +10:00
Harrison
bf98d4d308 Fix spelling mistake 2016-04-14 10:27:05 +10:00
Harrison
bc2b82cb33 Fix stutter 2016-04-14 10:25:48 +10:00
Harrison
b206661b37 Add Response documentation 2016-04-14 10:23:45 +10:00
Harrison
99c1be7fa1 Add documentation to receiving 2016-04-14 10:07:23 +10:00
Harrison
c2ae2a3f30 Add documentation to Message and Delivery 2016-04-14 09:53:55 +10:00
Harrison
f98f5920a3 Add documentation of actions 2016-04-14 09:47:15 +10:00