Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add account linking functionality for order update #13

Open
rubycalling opened this issue Jun 4, 2019 · 9 comments
Open

Add account linking functionality for order update #13

rubycalling opened this issue Jun 4, 2019 · 9 comments
Labels
enhancement New feature or request

Comments

@rubycalling
Copy link

Is your feature request related to a problem? Please describe.

Currently, when a user request an order update we are mocking the account linking feature instead of actually leveraging it.

Describe the solution you'd like

Trigger the account linking flow in place of the current placeholder in https://github.com/fbsamples/original-coast-clothing/blob/master/services/order.js#L51

Documentation

@rubycalling rubycalling added the enhancement New feature or request label Jun 4, 2019
@mInzamamMalik
Copy link

+1
please add account linking feature in this demo
such as Auth0.com code flow and add in the app in the beginning ideally so the messenger will recognize the user from the day one

@mInzamamMalik
Copy link

Problem:

In my case what happening is, it is always saying Account Linking Failed

image

What I am doing

when I need user to be linked to my app, I send a login button to the user like this:

  http.post(`https://graph.facebook.com/v2.6/me/messages?access_token=${PAGE_ACCESS_TOKEN}`, {
                "recipient": {
                    "id": "2829343507138856"
                },
                "message": {
                    "attachment": {
                        "type": "template",
                        "payload": {
                            "template_type": "button",
                            "text": "Try the log in button!",
                            "buttons": [
                                {
                                    "type": "account_link",
                                    "url": "https://dev-sysborg.auth0.com/authorize?response_type=code&client_id=VYierFrTxMb1Kky3DfPEqUHXaShdmH43"
                                }
                            ]
                        }
                    }
                }
            }).then(() => {
                response.send("ok")
            })

user see this login button like this on their messenger screen:

image

when user try to login by pressing the button, it pops up a new window and open login screen in that window:
image

and after entering credentials it redirects to a screen which says Account linking failed,

something like this:
image

I am sure there is nothing wrong with the Auth0 configuration because it is working fine with postman and connected very well with some other platforms

someone said I must have to subscribe to account linking event so I have subscribed to these three events: messages, messaging_postbacks, messaging_account_linking

I am Stuck at the end of the story,
Please help me out

@jorgeluiso
Copy link
Contributor

Have you whitelisted the domain https://dev-sysborg.auth0.com? Try it an check in the meantime this issue is open and will be closed as soon a we shipped the account linking demo.

here is the devdocs of it but I assume that you already know that.
https://developers.facebook.com/docs/messenger-platform/identity/account-linking/

@mInzamamMalik
Copy link

mInzamamMalik commented Jun 21, 2019

Hi @jorgeluiso

your mentioned document doesnt talk about whitelisting domain, can you please check if you send me correct document link, or may be you can tell me directly how can I whitelist my domain
thanks in advance :-)

@mInzamamMalik
Copy link

@jorgeluiso

I have found domain whitelisting inside facebook developer app > setting > advanced setting
but is doesnt help :-(

screenshots:

image

image

@jorgeluiso
Copy link
Contributor

Try whitelisting the domain at the page level, on the messenger platform settings of the page.
https://www.facebook.com//settings/?tab=messenger_platform

If that does not work, rest assure that we are going to implement this and close this issue. Alternatively you can implement you own account linking leveraging the extension sdk to get the psid on a webview rendered as an extension. On that webview you can provide a login flow were you then can match your user id with the psid provided by the extension SDK.
https://developers.facebook.com/docs/messenger-platform/guides/chat-extensions/

@mInzamamMalik
Copy link

Hi @jorgeluiso,
I visited the page setting and I put the url there in whitelist but still the problem is same
can you please guide me which is the best place where i can ask for support

Thanks,
Malik.

@mInzamamMalik
Copy link

do something @jorgeluiso @rubycalling

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants