Location widget in messenger platform displays a search bar in mobile version but not in Desktop Version

Viewed 154

By using bot functionality provided by facebook messenger platform, I want users to be able to provide location by using search.

It's working as expected in mobile app of the messenger as it's showing search option. But in the desktop version of the messenger, search option is not showing in location widget.

I wanted to ask that is it expected behavior or I'm missing out something.
Also in browser console, it's showing some error:

ErrorUtils caught an error: "navigator.permissions.query(...).then(...).done is not a function". Subsequent errors won't be logged; see https://fburl.com/debugjs.ja @ qtaMy7UNoCv.js:47.

Here's what I've tried so far:

def send_location_with_quick_reply(self, recipient_id, message, quick_replies):
    url = self.get_message_url()

    payload = {
        "recipient":{
            "id":recipient_id
        },
        "message":{
            "text": message,
            "quick_replies":[{
                "content_type": "location"
             }]    
        }
    }
    # _do_post will hit the send_message API of `Messenger`.
    return self._do_post(url, payload)

And here's the response I'm getting after the user chooses the location:

{
"object": "page",
"entry": [{
    "id": "128922990987384",
    "time": 1505890084176,
    "messaging": [{
        "sender": {
            "id": "1456347437763847"
        },
        "recipient": {
            "id": "128922990987384"
        },
        "timestamp": 1505890084065,
        "message": {
            "mid": "mid.$cAAAvskrTvY9kz1Bs4Vengsjpb9L_",
            "seq": 2366,
            "attachments": [{
                "title": "User's Location",
                "url": "https:\\/\\/l.facebook.com\\/l.php?u=https\\u00253A\\u00252F\\u00252Fwww.bing.com\\u00252Fmaps\\u00252Fdefault.aspx\\u00253Fv\\u00253D2\\u002526pc\\u00253DFACEBK\\u002526mid\\u00253D8100\\u002526where1\\u00253D12.9703749\\u0025252C\\u00252B77.6361206\\u002526FORM\\u00253DFBKPL1\\u002526mkt\\u00253Den-US&h=ATNsjbke0tPFGIFpCq4MA5l1W6wmiwp0cTfUZNXSSbMDHxygEM4GrVlZmtaebsN4elliFhMSJNmIFwQgn-p_fxnF2hW0VdKTj2z_0hsWnH4dlLZGdQ&s=1&enc=AZN9DwrutbtXSfRAdxQf4bzFSMSO3zujAb0LBOgUt9mz16ZnDn7CSZDBLmnISjfAMbLG6b6H6hn9a3KCb6wOo7dn",
                "type": "location",
                "payload": {
                    "coordinates": {
                        "lat": 12.9703749,
                        "long": 77.6361206
                    }
                }
            }]
        }
    }]
}]

}

I am using python and drf to integrate with messenger platform.

1 Answers

Yes, this is expected behavior currently.

Related