Site updated at 2017-10-14 13:06:39 UTC

This commit is contained in:
Travis CI 2017-10-14 13:06:39 +00:00
parent 7d7c6da80a
commit 7e41c1a802
26 changed files with 66 additions and 66 deletions

View file

@ -102,8 +102,8 @@ The phone number used in <strong>target</strong> should be registered with Faceb
<span class="s">data</span><span class="pi">:</span>
<span class="s">message</span><span class="pi">:</span> <span class="s1">'</span><span class="s">Good</span><span class="nv"> </span><span class="s">Evening'</span>
<span class="s">target</span><span class="pi">:</span>
<span class="pi">-</span> <span class="s">+919413017584</span>
<span class="pi">-</span> <span class="s">+919784516314</span>
<span class="pi">-</span> <span class="s1">'</span><span class="s">+919413017584'</span>
<span class="pi">-</span> <span class="s1">'</span><span class="s">+919784516314'</span>
</code></pre>
</div>
<p>You can also send messages to users that do not have stored their phone number with Facebook, but this requires a bit more work. The Messenger platform uses page specific user IDs instead of a global user ID. You will need to enable a webhook for the “messages” event in Facebooks developer console. Once a user writes a message to a page, that webhook will then receive the users page specifc ID as part of the webhooks payload. Below is a simple PHP script that reacts to the message “get my id” and sends a reply containing the users ID:</p>