هل تعلم بوت Libre كما يوفر مجانا استضافت المنتديات على موقع الويب الخاص بك أو الهاتف المحمول التطبيق ؟
Bot Libre Forum

Request User Location on Facebook

قبل admin نشر Oct 24 2017, 15:20

You can now request and access a user's location from a Facebook Messenger bot.

Facebook Messenger can send you the user's location in longitude and latitude coordinates using a "quick reply" option.

See,
https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies/

To send a custom quick reply in Bot Libre you need to return a JSON "command" with your bot's reply message.

The command would look like,

{ type:"facebook", quick_replies: [{ content_type:"location" }] }

Sending this command will let Bot Libre send the quick_replies JSON to Facebook.
This will ask the user for their location. When they submit their location it will be passed as a JSON object with the user's input message.

To allow this you must enable "Track Message Objects" from your bot's Facebook settings page in its Admin Console. This will allow your Self script to access the message attachment and get the longitude and latitude coordinates of the user.

Here is an example script,
https://www.botlibre.com/script?id=19424589


by danishrabbani1100 posted Mar 11 2019, 7:44

This piece of code is not working in latest version of botlibre please help.


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2539, today: 0, week: 12, month: 8

by admin posted Mar 11 2019, 10:58

What error or issue are you getting?


Thumbs up: 0, thumbs down: 0, stars: 0.0
Views: 2634, today: 0, week: 10, month: 8

معرف: 19477505
Tags: how to, scripts, facebook, locations, geospatial, quick replies
نشر: Oct 24 2017, 15:20
الردود: 2
الآراء: 5446, اليوم: 5, الأسبوع: 27, الشهر: 21
0 0 0.0/5