Botframework-sdk: Facebook Account Linking event

Created on 18 Jul 2016  Â·  23Comments  Â·  Source: microsoft/botframework-sdk

Is there a timeline for implementing Facebook's API Account Linking events?

I have implemented the whole control flow, but the Account Linking Callback is not sent to my application.

Alternatively, is there a way of enabling this callback through the Framework to the applications?

bug

Most helpful comment

+1 I'm in the same boat. The SigninCard doesnt appear to use the new Messenger account linking feature, therefore I'm using a sourceEvent and sending the channel data manually but no callback :(

All 23 comments

Hmmm...Looking at the code you should be receiving a message activity with
{
"type":"message",
...
"channelData" : {
"sender":{
"id":"USER_ID"
},
"recipient":{
"id":"PAGE_ID"
},
"timestamp":1234567890,
"account_linking":{
"status":"unlinked"
}
}
....
}

Okay, so I tested this with the v1 lib a couple days ago. We have just updated the code to v3, so I need to run another test.

I'm having problems sending a SigninCard to Facebook, though. I'm using this:

            const message = new builder.Message(session);
            message.attachments([
                            new builder.SigninCard(session)
                                            .button("Login", "http://localhost:9090/")
                                            .text("Logar")
            ]);

            session.send(message);

However, Facebook shows a regular card. When I click the button, it simply opens the link on another tab (instead of opening the popup with the Facebook's querystring parameters, as an "account_link" button would do). Am I missing something?

Well, I POSTed a request manually to show the correct card.

Even then, after the workflow from my end is done, the login is successful, I can see that "You logged in to your X account." printed in special lettering by Facebook, but nothing gets POSTed to my endpoint, so I can't act on it :(

Hi, @tomlm. Any advice on this? Is there anything else I should do to listen for the signin event?

+1 I'm in the same boat. The SigninCard doesnt appear to use the new Messenger account linking feature, therefore I'm using a sourceEvent and sending the channel data manually but no callback :(

Is your webhook registered for messaging_account_linking?

Just double checked it there and message_account_linking is selected. I
only tried to do account linking yesterday with botbuilder v3.2.3 and I
didn't receive the callback message. One difference I did notice when
compared to previous attempts was the little superscript message didnt
appear in the conversation i.e. "You have been logged in....."

On 10/08/16 03:04, Tom Laird-McConnell wrote:

Is your webhook registered for messaging_account_linking?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/BotBuilder/issues/745#issuecomment-238746204,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAju4nEuuj_eJ-wwCWl_StIZjo4npfp5ks5qeTGpgaJpZM4JPIob.

You have to unlink it before trying to link it again. Otherwise the message
won't appear. But that has nothing to do with BotBuilder, it's Facebook.

On 10 Aug 2016 04:54, "byrner75" [email protected] wrote:

Just double checked it there and message_account_linking is selected. I
only tried to do account linking yesterday with botbuilder v3.2.3 and I
didn't receive the callback message. One difference I did notice when
compared to previous attempts was the little superscript message didnt
appear in the conversation i.e. "You have been logged in....."

On 10/08/16 03:04, Tom Laird-McConnell wrote:

Is your webhook registered for messaging_account_linking?

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
issuecomment-238746204>,
or mute the thread
StIZjo4npfp5ks5qeTGpgaJpZM4JPIob>.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/BotBuilder/issues/745#issuecomment-238792345,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACGGJ422jOulAN9np0aHrzXUzJaed5LVks5qeYOhgaJpZM4JPIob
.

Just did an unlink and I got the superscript message to tell me I have logged out. Now when I try linking I get and "Account Linking Failed" message in Messenger

The Account Linked Failed was a facebook issue which I raised with them yesterday. Its working again today however I still dont get the callback to my bot.

any update on this ?

As you noted, it looks like we're not passing the account_linking messages through. I'll fix the code to pass them to the bot in channeldata. We should be able to get this deployed in the next couple days.

The fix has been deployed. Please reopen you still see this

Hi,

I am still seeing regular card on fb messenger (instead of account linking) when using signin card. I dont need to update anything to make this work right ?

Thanks

Unfortunately, the built in signin card isn't rich enough to fully support the Facebook account linking functionality so you'll need to send your own card via channeldata. The fix above was to enable our channel to pass Facebook account_linking messages to your bot. Sorry for the confusion.

I am a little more confused now. By built in signin card you mean the content-type ('application/vnd.microsoft.card.signin') and message/channel specific processing you do at your end after the message is POSTed to botframework's server by the connector right ?

By sending my own card via channel data you mean by using sourceEvent ?

Yes - built in signin card is 'application/vnd.microsoft.card.signin'. If you are using the node sdk then you would need to send your own card via sourceEvent.

Thanks for the clarification.

One more doubt, since we wouldn't know how different inbuilt content types are processed at botframework's sever, how will we know what all things are supported?

We've heard that feedback multiple times so we're working on updating the documentation with a complete list of features that are supported by each channel. Hopefully, that will help to clarify the differences between channels.

Thanks.

Was just curious, why cant built in content types be updated to support things which are common in all the channels. Like Connect/SignIn/Account Linking is present in almost all the channels, just that the message format is different, so wouldn't is make sense for card.signin to process the message accordingly and send it to the bots ?

Palash

We're working on ways to enable common scenarios across the channels. Look for an update in the future that enables this.

I successfully linked my accounts.
How to handle if user has linked their account or not ?
How to get authorization_code field ?
Is that possible ? @matheus208 , @tomlm , @craigjensen

How to send a SourceEvent with the latest version: Microsoft.Bot.Builder v4.9.3?

Was this page helpful?
0 / 5 - 0 ratings