As of now I cannot seem to get my Alexa skill linked with twitter. Currently, I have a node/express server running on EBS which, I am using passport-twitter to handle the oauth part of the authentication. Right now my flow is such:
- Enable skill in Alexa app
- Click 'sign in to account' in alexa app
- Twitter Login screen is displayed and I enter user name and password then click Login button
- get redirected to Amazon provided url for callback once authenticated and get an 'Unable to link you skill'.
I login and everything, so I think issue is with redirection, which is defined in the twitter auth callback on my express server like so:
app.get('/auth/twitter/callback',
passport.authenticate('twitter', {failureRedirect: '/login'}),
function(req, res){
var redirectUrl= 'https://pitangui.amazon.com/spa/skill/account-linking-status.html?vendorId=M28J2SR508CPU9#state='
+state+'&access_token='+myToken+'&token_type=Bearer';
res.redirect(302, redirectUrl);
});
My redirect url, minus the sensitive data, is https://pitangui.amazon.com/spa/skill/account-linking-status.html?vendorId=M28J2SR5BLAH#state=&access_token=&token_type=Bearer
Any ideas on how to debug/troubleshoot as well as any suggestions to fix issue would be awesomely appreciated.
You have a hash ('#') before the 'state' URL parameter. Perhaps you meant for that to be an ampersand ('&')?
来源:https://stackoverflow.com/questions/37077214/account-linking-alexa-with-twitter-amazon-echo