SignIn card not showing in skype as we assign facebook oauth url
Hi ,Am using facebook Oauth in my bot.Initially it need to be authorized to continue with the other flow. Following is the code where am assigning the fb outh url to the value of the signin card.Even when i debug i could see the value is properly assigned but the card is showing a different text .You can find it in the screeshot attached below. The code I am using is as follows:
var fbLogin = $"{FacebookHelpers.GetFacebookLoginURL(ResumptionCookie, FacebookOauthCallback.ToString())}";
var replytoconversation = context.MakeMessage();
replytoconversation.Text = "Please sign in using this card";
//replytoconversation.recipient = activity.from;
//replytoconversation.type = "message";
replytoconversation.Attachments = new List<Attachment>();
var cardbuttons = new List<CardAction>();
cardbuttons.Add(new CardAction
{
Title = "connect",
Value = fbLogin,
Type = ActionTypes.Signin
});
SigninCard plcard = new SigninCard("you need to authorize me", cardbuttons);
Attachment plattachment = plcard.ToAttachment();
replytoconversation.Attachments.Add(new SigninCard("you need to authorize me", cardbuttons).ToAttachment());
await context.PostAsync(replytoconversation);
context.Wait(MessageReceivedAsync);
Fblogin Variable is holding the oauth url .If I assign the url directly its working fine,but I need the generated url to be used in the current context.
The screenshot of Signin card which is not working properly is as shown
.
Please help me out solving this issue.Thank you in advance.
Hi i have the similar issue, but without using cards, and via facebook messenger channel, seems that the url i passed to the user is cut into pieces (2 halves in my case) as such the url has missing parameters needed for the callback
I was using "SimpleFacebookAuthDialog.cs" from the BotBuilder examples
async Task LogIn(IDialogContext context) { string token; if (!context.PrivateConversationData.TryGetValue(AuthTokenKey, out token)) { context.PrivateConversationData.SetValue("persistedCookie", ResumptionCookie); var fbLogin = $"Go to: {FacebookHelpers.GetFacebookLoginURL(ResumptionCookie, FacebookOauthCallback.ToString())}"; await context.PostAsync(fbLogin); context.Wait(MessageReceivedAsync); } else { context.Done(token); } }
this part : await context.PostAsync(fbLogin) passed the message in two halves ( the total string count is in my case more than 255 characters)
@sruthi-chelukala here is a sample code with the sigin card that works across different channels:
var reply = context.MakeMessage();
var url = FacebookHelpers.GetFacebookLoginURL(ResumptionCookie, FacebookOauthCallback.ToString());
reply.Text = "Please sign in using this card";
var loginCard = new SigninCard {
Buttons = new List<CardAction> {
new CardAction {
Title = "Login to Facebook!",
Type = ActionTypes.Signin,
Value = url }
},
Text = "you need to authorize me"
};
reply.Attachments.Add(loginCard.ToAttachment());
await context.PostAsync(reply);
Skype desktop

Skype webcliet

Facebook

Slack

Webchat

@stucko That is a limit that facebook is enforcing on number of characters. You can only have 320 character in a text message: https://developers.facebook.com/docs/messenger-platform/send-api-reference/text-message
I recommend using a url shortener to work around this limitation.