0

I'm working on a fairly basic Alexa skill that, in essence, searches through a specific Twitter feed looking for a hashtag, parses that tweet, and reads it back. The simplest way to do this seems to be using the Twitter API, since scraping appears to be against the TOS.

... crawling the Services is permissible if done in accordance with the provisions of the robots.txt file, however, scraping the Services without the prior consent of Twitter is expressly prohibited.

I've been having some trouble understanding how account linking works, as I've never dealt with OAuth before. I've been trying to follow the one tutorial around, but neither the text or video version were clear me.

Why the need for an external webapp?

...we need an OAuth implementation of our own to make the integration work correctly

What's wrong with the one provided by Twitter? Why can't any issues be fixed within the Lambda method, since the account integration isn't being touched otherwise AFAIK? Isn't having the tokens passed around via the URL a bad idea too? Their example code seems to require that the Consumer Secret be hard coded too.

Enter: “https://alexa-twitter-airport-info.herokuapp.com/oauth/request_token?vendor_id=XXXXXX&consumer_key=YYYYYY&consumer_secret=ZZZZZZ”.

At the very least, their webapp seems to be down for the time being, and it'd be nice to have an option that doesn't require paying money to host another copy.

I've seen this post discussing a Node.js OAuth implementation, but the necessity for such an implementation still escapes me.

JMY1000
  • 131
  • 2
  • 9
  • It doesn't appear that Alexa Skill is relevant to your question. Best to remove that for clarity. Also, what is "the Lambda method"? I'm familiar with lamda methods in general, but I don't think either is relevant to your question, as well. Finally, what is "their webapp"? If you have never used a REST API or authenticated using oauth, it can be confusing at first. It sounds like you are in that place. – Jonas Aug 24 '17 at 00:48
  • I don't see a clear question in your post. Is your question, how does one authenticate using a Twitter user id and password? Or, is your question, why does Twitter require a redirect from their login page? I'm just guessing. Can you state the question? – Jonas Aug 24 '17 at 00:58
  • @Jonas The Alexa skill is relevant, since there are specific account-linking features provided by Amazon. Again, see [this tutorial.](https://www.bignerdranch.com/blog/developing-alexa-skills-locally-with-nodejs-account-linking-using-oauth/) The Lambda method is *extremely* relevant, since it's what's actually talking to the Twitter API and thus needs the authentication tokens. "Their webapp" is the same one described in the tutorial (source on GitHub) that acts as a middleman between Twitter and the Lambda method as an OAuth implementation. – JMY1000 Aug 24 '17 at 01:03
  • @Jonas I'm not arguing I'm not confused (that's why I posed a question), just not on those bits. There are a few questions, all outlined after the bolded "Why the need for an external webapp?" Read those. The question "How does one authenticate using a Twitter user id and password" is close, but doesn't deal with the specific implementation here. "Why does Twitter require a redirect from their login page" is further since I understand the tokens need to be passed back after authentication, I'm just confused as to the specific implementation provided in the tutorial by Amazon. – JMY1000 Aug 24 '17 at 01:05
  • That makes sense. I'm not versed in Alexa, so I can't help you. Good luck! – Jonas Aug 24 '17 at 01:34
  • @Jonas Alright, thanks for the help anyways. – JMY1000 Aug 24 '17 at 01:37

0 Answers0