README.md in stealth-facebook-0.12.0 vs README.md in stealth-facebook-0.13.0
- old
+ new
@@ -10,12 +10,23 @@
When configuring your webhooks, you'll want to enable the `messages`, `messaging_referrals`, and `messaging_postbacks` web hooks like so:
<img src='fb-config.png' width='875px' alt='Facebook Config Screenshot' />
-Make sure you don't enable `message_reads` as that is not yet supported by this gem.
+### message_reads
+Beginning with version `0.13.0` of this gem, `message_reads` webhooks are supported. When enabled in your Facebook configuration, they will appear as `current_message.read`. That will return a hash:
+
+```ruby
+{
+ watermark: 1458668856253,
+ seq: 38
+}
+```
+
+More info about `message_reads` webhooks can be found in the [Facebook Developer docs](https://developers.facebook.com/docs/messenger-platform/reference/webhook-events/message-reads).
+
## Configure The Integration
```yaml
default: &default
facebook:
@@ -128,13 +139,13 @@
)
```
### Analytics
-If you'd like to track custom bot metrics in addition to the ones provided automatically by Facebook Analytics, you can do so in starting in version `0.12.0` of this gem.
+If you'd like to track custom bot metrics in addition to the ones provided automatically by Facebook Analytics, you can do so starting with version `0.12.0` of this gem.
-In order to send these metrics, you'll need to add the `app_id` of the bot as well as the `page_id` of the Facebook page (attached to the bot) to `services.yml`:
+In order to send these metrics, you'll need to include the `app_id` of the bot as well as the `page_id` of the Facebook page (attached to the bot) to `services.yml`:
```yaml
default: &default
facebook:
verify_token: <%= ENV['FACEBOOK_VERIFY_TOKEN'] %>
@@ -148,10 +159,10 @@
```ruby
Stealth::Services::Facebook::Client.track(recipient_id: u.recipient_id, metric: 'name of your metric', value: 2)
```
-To specify additional options:
+You can specify additional options:
```ruby
Stealth::Services::Facebook::Client.track(recipient_id: u.recipient_id, metric: 'signup', value: 2, options: { 'fb_description' => 'A signup occured.' })
```