How do I use tel protocol for click to call in qnamaker - botframework

I am using botframework-webchat version 4.9.1 and Qnamaker. I have multiple URL links in Qnamaker which are working fine but when I try to use tel: to have a functionality to click to call on a number it is rendered as # in Qnamaker. I have used as follows:
Question -> Answer text [1800-XXXX-XXXX](tel:1800-XXXX-XXXX)
Save it train it and publish and it renders as www.mydomainwebsite.com/#
Does Qnamaker support tel protocol or do I need to do something differently? Please help.
I tried with tel protocol and it worked when I put tel:// and save & train

Related

Bot Framework - Display User's intent

Trying to figure out how I can take the intent from LUIS and insert it into the response from the bot. I cannot seem to find the variable/path to this value. I've tried:
#intentName
turn.recognized.intents.intentName
luisResult.intents[0]
The docs are not helping since it just shows java classes, doesn't directly translate to the Composer app afaik.
You can pull the first intent via the following adaptive expression:
${foreach(turn.recognized.intents, x, x.key)[0]}

How to configure LUIS response when there will be no match found in KB QnA maker using Node.js?

Not able to figure out how to initiate the dialogue when there is no match found on KB.
With that dialog, I need to configure the LUIS response.
I am using this sample https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/49.qnamaker-all-features.
As you are navigating the example: https://github.com/microsoft/BotBuilder-Samples/tree/master/samples/javascript_nodejs/49.qnamaker-all-features
You can easily go to "dialog" - > Then "qnamakerBaseDialog.js"
You can see the var "noAnswer"
What you need to do is to customize the value then you should see what you want.

Some links from botframework do not open in MS Teams

I want to display an adaptative card with an openUrl action to a sharepoint page.
The sharepoint url contains some filters and looks like : https://xxx.sharepoint.com/sites/main/Recherche/results.aspx?k=Annee:'2018' AND Group:'test'
From Teams client on windows, clicking on the team doesn't work at all (no action)
On web client, it opens a new teams on the source conversation I clicked the link on.
It probably comes from specials chars and encoding (stripping the last part after the colon make it work) but I didn't find the proper encoding to work with the full link.
BTW, the full link works in Bot Emulator and Skype for Business.
I'm not sure what encoding you tried, but the : characters in the URL are causing the problem because they aren't allowed. There's no way for me to test this, but if you call encodeURI on the string and set that as the value of url it should work:
encodeURI("https://xxx.sharepoint.com/sites/main/Recherche/results.aspx?k=Annee:'2018' AND Group:'test'")
returns
"https://xxx.sharepoint.com/sites/main/Recherche/results.aspx?k=Annee:'2018'%20AND%20Group:'test'"

Chromecast new Cast.Api()

I just started using Chromecast SDK today and got bit confused with its APIs and samples given in the web.
What I am trying to do is to send some messages to the Chromecast so it will display them on the big screen. I am going to use Chrome API with HTML5/JS/CSS.
Most examples (https://github.com/pjjanak/chromecast-hello-world/blob/master/sender/index.html , http://nerdwin15.com/2013/10/chromecast-development-part-one-chrome-sender/) in the web uses new Cast.Api() in the sender and uses an Activity in doing so. But I could not find a reference to a Cast.Api in the Chrome API. Most Google references deal with Media and I am not sure whether I have to use them. So to sum up, following are the questions I have (Sorry! I did read the API and developer guide but I am still clueless).
Do I have to write a custom receiver to show text on TV screen. Can't I survive default receiver, chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID
Is handling multimedia files different from displaying text on the Chromecast or can I set the mime type to text/html and send a text stream (doesn't work for me at the moment)
Are those examples on the web uses a deprecated way of sending data to chromecast?
Thanks in advance,
Ish
Ok I think I found the answer from following documents,
https://developers.google.com/cast/docs/receiver_apps
https://github.com/googlecast/CastHelloText-chrome/blob/master/chromehellotext.html
Will try them and let you all know!
Following example page is very useful for anyone who try writing chromecast apps
https://github.com/googlecast
I'm not sure how you fared, but here are some quick responses to your questions.
Yes, you have to write a custom receiver if you want to do anything other than sending images, audio, or video to the Chromecast. You can see a list of supported media Default Media Receiver here: https://developers.google.com/cast/docs/media
Yes (see above), it requires a custom receiver, which will also require your own appId and I'm pretty sure a custom namespace.
To my knowledge, all of the examples up on https://github.com/googlecast should be relevant, but I am working on a few wrappers to try to simplify getting up and running with custom Chrome Sender and Receiver apps. You can check them out here: https://github.com/googlecast Let me know if those help, and if you have any feedback to share.
I hope you've already figured all this stuff out, but if not hopefully this is useful.

Google static map API getting 403 forbidden when loading from img tag

What I have is a Google map that shows the location of a property but when I come to print the dynamic maps dont print so good so I decided to implement the Google Static Map image API.
http://lpoc.co.uk/properties-for-sale/property/oldgate-dairy-st-james-road-long-sutton-cambridgeshire-pe12/?prop-print=1
^^ is an example of a property in print view and should show a static map image but it fails to load and looking at my inspector I'm getting a 403 Forbiden response for the image.
But if I go to the URL directly the image loads...
What am I doing wrong?
Thanks
Scott
This has gotten quite a lot of views, so I'm adding my solution to the problem here:
When using the new API, make sure you generate a Key for browser apps (with referers) and also make sure the patterns match your URL.
E.g. when requesting from example.com your pattern should be
example.com/*
When you're requesting from www.example.com:
*.example.com/*
So make sure you check whether a subdomain is present and allow both patterns in the developer console.
Visit the Developer Console.
Under API Keys, click the pencil icon to edit.
Under "Key restrictions", ensure that you have an entry for example.com/*, *.example.com/*, and any local testing domains you might want.
There seems to be some confusion here, and since this thread is highly ranked on Google, it seems relevant to clarify.
Google has a couple of different API's to use for their maps service:
Javascript API
The old version of this API was version 2, which required a key. This version is deprecated, and it is recommended to upgrade to the newer version 3. Note that the documentation still states that you need a key for this to function, except if you're using "Google Maps API for Business".
Static Maps API
This is a whole different story. Static maps is a service that does not require any javascript. You simply call an url, and Google will return a maps image, making it possible to insert the URL directly into your <img> tag.
The newest version is version 2, and this requires a key to function because a usage limit is applied.
A key can be requested here:
https://code.google.com/apis/console
And the key should be added to the request for the correct image to be generated:
http://maps.googleapis.com/maps/api/staticmap?center=New+York,NY&zoom=13&size=600x300&key=API_console_key
I hope this clears up some confusion.
I had this same problem but my solution was different. I had the V2 maps api enabled, but not the static maps api (I thought this was V2). I enabled the static maps api and it worked.
Oops I feel like such an idiot. I was using the old V2 maps API URL and not the new V3 API URL. I was getting a 403 because I was using the V2 URL without providing an API key :(
Be hundred percent sure of these points: (for static maps)
Enable your project at this url :
https://console.developers.google.com/apis/api/static_maps_backend/overview?project=
You have your localhost, staging and production - all urls with wildcards enabled in the referrer section.
Google has changed its policy and you now need an api key to display maps. refer this for more : Google Maps API without key?
Hope it helps.
Staticmaps V3 doesn't need the "Key" attribute and removing it seems to solve the <img> source problem.
Try with an URL like this:
http://maps.googleapis.com/maps/api/staticmap?center=0.0000,0.0000&zoom=13&size=200x200&maptype=roadmap&markers=0.0000,0.0000&sensor=false
For more information read this.
Yeah, Google Maps API version 3 were java-script version; "Google Static Maps" latest were 2.0. I suspect there might be some restriction on use.
I could also not display static maps and could see 403 error in the browser's network console.
http response headers:
status:403
x-content-type-options:nosniff
I had an API key with a lot of Google Maps APIs enabled but the Google Static Maps API was missing, enabling it solved the issue.
now you should use 'signature' parameter, which you should add to request - otherwise static maps won't work.
here is few useful links
1) how to generate signature
2) how to make signature on BE side (code snippet)
I am using Wordpress 4.9.4 with ChurchThemes Exodus Theme. I had applied for & generated a New API_KEY.
I confirmed it was being used when calling the map:
Google Map Link
However the Js Console showed the following error:
Google Maps Error in Js Console
As Johnny White mentioned above I had to navigate to the API Library Screen via APIs & Services Menu:
enter image description here
You will be greeted by the API Library screen:
API Library Screen
Click on Maps(17) Lower LHS.
Search for & click Google Static Maps API - Enable it if needed:
Google Static Maps API
You may also need to enable Google Maps Javascript API (same process as for Static Maps:
Google Maps Javascript API
Once that is done your maps should start appearing on your site or app.
If they don't appear on refresh you may need to:
clear your cache (Wordpress or Drupal webistes),
wait the 5 min recommended for the API to Register the enabled API's
Try enabling billing on this Google Cloud Project/Firebase Project.
I was experiencing this same issue and just received the 403 error in the console.
Copying and pasting the Static Maps URL in to the URL bar and loading it showed the following error message:
The Google Maps Platform server rejected your request. You must enable Billing on the Google Cloud Project at
https://console.cloud.google.com/project/_/billing/enable Learn more at https://developers.google.com/maps/gmp-get-started
Hope this helps!

Resources