dialogflow / dialogflow-fulfillment-nodejs

Dialogflow agent fulfillment library supporting v1&v2, 8 platforms, and text, card, image, suggestion, custom responses
Apache License 2.0
598 stars 281 forks source link

Twitter Support #23

Open gregseed opened 6 years ago

gregseed commented 6 years ago

Is this ever going to be included, or has this been deprecated? (I know there is a lot of flux right now with the Account Activity API)

mattcarrollcode commented 6 years ago

Twitter, unfortunately, has not ever been supported by this library with the native responses (text, card, images, etc.), due to Dialogflow not supporting message objects for Twitter but you can create a custom payload for Twitter responses: https://github.com/dialogflow/dialogflow-fulfillment-nodejs/blob/master/docs/Payload.md

I'll consider this a feature request and leave this open for further comments.

Ashwin-Kapes commented 6 years ago

I've added two Text Responses in DialogFlow Welcome Intent but in twitter DM I'm getting any one response that is either Line one or Line Two. why so? Is it possible to use JSON Payload instead of Text Response when connected to twitter.

response

goutham-sabapathy commented 6 years ago

Twitter, unfortunately, has not ever been supported by this library with the native responses (text, card, images, etc.), due to Dialogflow not supporting message objects for Twitter but you can create a custom payload for Twitter responses: https://github.com/dialogflow/dialogflow-fulfillment-nodejs/blob/master/docs/Payload.md

I'll consider this a feature request and leave this open for further comments.

The link you have provided is broken. It would be great if you could provide a sample custom payload where we can send rich messages like Twitter's Quick Replies.

aradwyr commented 6 years ago

Yes certainly, here's the reference to our Twitter-related Dialogflow docs and below is an example of a payload response:

const googlePayloadJson = { 
  expectUserResponse: true,
  isSsml: false,
  noInputPrompts: [],
  richResponse: {
    items: [{ simpleResponse: { textToSpeech: 'hello', displayText: 'hi' } }]
  },
  systemIntent: {
    intent: 'actions.intent.OPTION',
  }
}

let payload = new Payload(PLATFORMS.ACTIONS_ON_GOOGLE, {});
payload.setPayload(googlePayloadJson);

Payload is a constructor that extends from the RichResponse class. To read more about the RichResponse class and the message object in the Dialogflow(v2) docs.

VamsidharMuggulla commented 5 years ago

Why this is still open!!??

goutham-sabapathy commented 5 years ago

You can close this

On Tue, 30 Jul, 2019, 4:27 AM Vamsidhar Muggulla, notifications@github.com wrote:

Why this is still open!!??

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dialogflow/dialogflow-fulfillment-nodejs/issues/23?email_source=notifications&email_token=ABRSUGFN7NPEHQPMIJ6WBM3QB73PXA5CNFSM4EZUI7JKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3DGUJY#issuecomment-516319783, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRSUGBDYWK7S6LAPA5JKPTQB73PXANCNFSM4EZUI7JA .