How to Trigger a followup intent when user clicks on a dialogflow button link - dialogflow-es-fulfillment

I have used the dialogflow one click integration for telegram. how can i trigger a follow up intent when a user clicks on a button link that redirects to an external site?
agent.add(
new Card({
title: `Please click the link below and input your Password.`,
buttonText: "Click to input your password",
buttonUrl: "https://password.com/",
meta: "run intent"
})
);
I added a meta key, but this did not work.
Thanks

Related

Getting a Voice Match error when trying to call Actions on Google SignIn helper

What I'm trying to achieve is user authentication (account linking) before the default welcome intent is called.
(I'm aware that in the design documents it is recommended to not require users to authenticate, but it is required for our action)
We have an undeployed action that I have tested in the simulator. The conversation flow is
The user is prompted to signin ie, new SignIn()
They are prompted to create an new item
The item is saved and the user receives a success/fail response and continues
In DialogFlow I have a Default Welcome Intent (prompts the user to create an new item), an intent to capture the item.
Our fulfillment intents
app.intent('ask_for_sign_in_detail', (conv) => {
conv.ask(new SignIn());
});
app.intent('ask_for_sign_in_confirmation', (conv, params, signin) => {
if (signin.status !== 'OK') {
return conv.ask('You need to sign in before using the app.');
}
// const access = conv.user.access.token;
// exchange access.token for jwt from backend
return conv.ask('Great! Thanks for signing in.');
});
app.intent('Default Welcome Intent - fallback', (conv) => {
createItem(conv);
});
In DialogFlow under integrations for the Google Assistant I have required that Sign In is required before the Default Welcome Intent.
When I go to test in the simulator I can see that under account linking there is no information (ie, no accounts linked) and there is a message stating 'No account is linked to Google. Start a test conversation for account linking.'
Starting a conversation I get the following error:
Your voice wasn't recognized, so I can't connect you to Talkatoo.
Check the Voice Match settings in the Google Home app.
I am not sure where I have strayed trying to authenticate users with their Google accounts.
This has been fixed by Google as of 2019-07-19 02:57 PDT. Received a response from the AoG team, and tested it in the simulator. It was a Google bug.

Tapping on google assistant list always fires fallback intent for the first time

My Dialogflow agent is using an 'Actions on Google Rich Message' List response object to display options on the Google Assistant platform.
The list options work perfectly when testing on the Dialogflow console. However, when testing through the Google Assistant Simulator or Google Assistant app on a mobile device, the list option does not work on the first try. It works only when selecting an option the second time. Below is my intent code which generates the list.
app.intent('Default Welcome Intent', conv => {
conv.ask('Hi welcome to micro strategy. I am Emily, your virtual assistant. Please tell me how can I help you');
conv.ask(new List({
title: 'Please choose',
items: {
['SELECTION_KEY_GET_CALENDAR_EVENTS']: {
synonyms: [
'Get calendar events',
],
title: 'Get calendar events',
description: 'Lets you retrieve calendar events',
},
['SELECTION_KEY_MODIFY_EVENTS']: {
synonyms: [
'Modify calendar events',
],
title: 'Modify calendar events',
description: 'Lets you modify calendar events'
},
},
}));
});
Any guidance would be appreciated.
This is because you must have an intent that handles the actions_intent_OPTION event, which is what is fired when you touch for the first time an element in the list.
Lists / Carousel always fire that event. If no intents can handle the actions_intent_OPTION event, then the conversation goes to the Fallback intent.
Refer to the documentation, section List > Requirements > Interactions > Voice/Text : Must have an intent for touch input that handles the actions_intent_OPTION event.
Let me know if it helps, Marco

Is there any method to share text from mobile web to wechat by sharing button?

I am looking for wechat sharing function like how whatsapp does.
href="whatsapp://send?text=http://www.example.com"
Based on my research, most of them will be encoded in QR code and scan the QR code with wechat scanner. Is there a way to share the text directly to friend when click on sharing button just like how whatsapp does?
Wechat doesn't have any official deep linking URL for sending a text. However, if you can add some JavaScript Code in your mobile web, you can achieve the share functionality.
Check out Send to chat documentation on Wechat JS SDK.
From JS SDK Documentation:-
wx.onMenuShareAppMessage({
title: '', // Sharing title
desc: '', // Sharing description
link: '', // Sharing link
imgUrl: '', // Sharing image URL
type: '', // Sharing type, such as “music”, “video “ or “link”. It is “link” by default.
dataUrl: '', // The data URL should be provided for items of type “music” or “video”. It is null by default.
success: function () {
// Callback function executed after a user confirms sharing
},
cancel: function () {
// Callback function executed after a user cancels sharing
}
});
We do have some unofficial deep linking URL like you mentioned. But it may stop work anytime if Wechat decided to change it.
Here is some of them below, sadly I don't know any URL to share a text to chat.
weixin:// - to open Wechat app (if installed)
weixin://dl/chat - to open chat screen of Wechat
weixin://dl/moments - to open user moements
weixin://dl/profile - to open user profile
weixin://dl/settings - to open settings page

Silent Facebook app request to specific facebook user

I'm using this code:
FB.ui(
{
method: 'apprequests',
message: "An invite',
title: 'App Request',
to: intFB_ID
}, requestCallback);
..but when I run it, it brings up a confirmation request dialoge box, which I have to physically click to 'Send Request'.
Is there anyway to send an App Request silently, in that there is no confirmation required, and so can be run on a Cron or as a batch?
Thanks
The code snippet you provided sends a "user generated request" and there's no way to do that without that specific dialog, so no you can not do it with no confirmation on the user side.
What you can do how ever is send an "app generated request" for the user instead.
The end result will be different though.
The two options are described in the Social Channels doc (under the Requests section).

Track use of send dialog

I'm using the Fb.ui send dialog to hopefully allow users to connect to other users. I want to know if there is anyway to track the use of this dialog box so I can tell if users are taking advantages of it.
You could track the usage of the send dialog by putting in some simple tracking at 3 different stages
User clicks on your 'send message' button to open the dialog
User opens the dialog but clicks cancel
User opens the dialog and then sends a message
Here's some sample code demoing how you can add a callback to the send dialog and determine whether or not the user actually sent a message. Although please note that there seems to be some issues with this at the moment and I'm not totally sure that the send dialog supports callbacks fully yet.
FB.ui({
method: 'send',
name: 'Google',
link: 'http://www.google.com',
},
function(response) {
if (response) {
// user sent the message
} else {
// user clicked cancel
}
});
In the callback function, trigger an ajax call to a php script that will recored the call in the database.
This way you'll know how many time the dialog was used, and by which user.