2017-02-27 6 views
1

Ich entwickle einen Bot mit Microsoft Bot Framework, auf Facebook Messenger zeigt das Karussell wie es soll, aber im Telegramm zeigt es als 2 verschiedene Karten auf zwei verschiedenen Nachrichten.Hat Telegram eine Möglichkeit, Karussells mit Bot Framework anzuzeigen?

Unterstützt nicht Telegram Karussells oder ist es meine Schuld?

Code:

public async Task Carousel(IDialogContext context, IAwaitable<IMessageActivity> activity) 
    { 
     var act = await activity; 
     //carousel 
     var replyToConversation = context.MakeMessage(); 
     replyToConversation.Text = "2+ Cards are a Carousel"; 
     replyToConversation.Recipient = message.From; 
     replyToConversation.Type = "message"; 
     replyToConversation.Attachments = new List<Attachment>(); 
     //1 
     List<CardImage> cardImages = new List<CardImage>(); 
     cardImages.Add(new CardImage(url: "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c0/Asimo_look_new_design.jpg/330px-Asimo_look_new_design.jpg")); 
     List<CardAction> cardButtons = new List<CardAction>(); 
     CardAction plButton = new CardAction() 
     { 
      Value = "https://en.wikipedia.org/wiki/Robot", 
      Type = "openUrl", 
      Title = "WikiPedia Page" 
     }; 
     cardButtons.Add(plButton); 
     HeroCard plCard = new HeroCard() 
     { 
      Title = "I'm a hero card", 
      Subtitle = "Robot Wikipedia Page", 
      Images = cardImages, 
      Buttons = cardButtons 
     }; 
     Attachment plAttachment = plCard.ToAttachment(); 
     replyToConversation.Attachments.Add(plAttachment); 
     //2 
     List<CardImage> cardImages2 = new List<CardImage>(); 
     cardImages2.Add(new CardImage(url: "https://upload.wikimedia.org/wikipedia/en/thumb/9/9b/FANUC_6-axis_welding_robots.jpg/330px-FANUC_6-axis_welding_robots.jpg")); 
     List<CardAction> cardButtons2 = new List<CardAction>(); 
     CardAction plButton2 = new CardAction() 
     { 
      Value = "https://en.wikipedia.org/wiki/Robot", 
      Type = "openUrl", 
      Title = "WikiPedia Page" 
     }; 
     cardButtons2.Add(plButton); 
     HeroCard plCard2 = new HeroCard() 
     { 
      Title = "I'm a hero card", 
      Subtitle = "Robot Wikipedia Page", 
      Images = cardImages2, 
      Buttons = cardButtons2 
     }; 
     Attachment plAttachment2 = plCard2.ToAttachment(); 
     replyToConversation.AttachmentLayout = AttachmentLayoutTypes.Carousel; 
     replyToConversation.Attachments.Add(plAttachment2); 
     await context.PostAsync(replyToConversation); 
    } 

Antwort

2

Es ist nicht deine Schuld. Laut der Channel Inspector hat das Karussell in Telegram ein heruntergekommenes Aussehen.