Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
newchannel
Roku Guru

Adding Twitter

Hi,

Does anyone have any information they can share about the proper way to add the Twitteroauth so viewers can Tweet the show they are watching?

Thank you.
http://www.victoryNOWfilmsandtv.com
0 Kudos
9 REPLIES 9
newchannel
Roku Guru

Re: Adding Twitter

Is anyone using the Twitter on their channel?
http://www.victoryNOWfilmsandtv.com
0 Kudos
newchannel
Roku Guru

Re: Adding Twitter

Are you using Twitter on your roku app?
http://www.victoryNOWfilmsandtv.com
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Adding Twitter

There is a Twitter OAuth sample channel in the SDK. It may be out of date at this point though. Twitter recently rolled out a significant update to their API. Their dev site is probably the best place to start.

https://dev.twitter.com/docs/api/1.1
0 Kudos
squirreltown
Roku Guru

Re: Adding Twitter

I tried the sample app in the SDK. I got as far as the twitter page which knew it was from my registered app, but clicking authorize just sent me to my home page. The Roku app then wanted a PIN which i did not get from twitter, I cant tell if this is because I was given one through a URLget or something and need to display a pin on my website or if the Roku app is out of date as far as the oauth thing works.

EDIT - OK i got to the pin by removing the callback URL from my settings, but the Roku app crashed after entering the PIN, and now crashes on launch on the first screen, so it seems to have registered OK but cant read what twitter is sending it. The debugger spit out a bunch of stuff that ended with "cant parse feed" so back to the above question - does the app need to be updated to work?
Kinetics Screensavers
0 Kudos
newchannel
Roku Guru

Re: Adding Twitter

Thanks for posting. You can see I have gotten no other posts much on this topic. I wanted to add it to my next channel and was wondering if anyone was using it. It has its uses so it would be great to see it working.

I hope you get your working. If I had mine going and could help you, I would but you are further along. Post here if you get yours working. I'd like to hear about it and know that it does work when implemented.
http://www.victoryNOWfilmsandtv.com
0 Kudos
squirreltown
Roku Guru

Re: Adding Twitter

Perhaps someone from Roku can weigh in on wether the app in the SDK is still valid.
thanks
Kinetics Screensavers
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Adding Twitter

"squirreltown" wrote:
Perhaps someone from Roku can weigh in on wether the app in the SDK is still valid.
thanks


I spent some time with it yesterday and the auth flow still works. I was able to retrieve a valid access token without modifying the sample channel other than pasting in my consumer key/secret.

Once it authenticates, the sample channel makes a call to /statuses/user_timeline that fails because it's pointed at a retired version of the Twitter API. The failure is printed to the debug console as an HTTP 410 error.
0 Kudos
squirreltown
Roku Guru

Re: Adding Twitter

Yep thats what happened to me. I'm assuming that pointing it to the 1.1 version will fix the issue, and hopefully what you need know is available on their dev site. I'll try that later. Thanks for the explanation Chris.
Kinetics Screensavers
0 Kudos
squirreltown
Roku Guru

Re: Adding Twitter

I tried this this morning and hopefully Roku will want to fix it since the SDK example is no good anymore.

Two things I could see have changed, the URL for the call Chris mentioned is a little different

http = NewHttp(m.prefix+"1/statuses/user_timeline.xml?screen_name=RokuPlayer")
is now
http = NewHttp(m.prefix+"1.1/statuses/user_timeline.json?screen_name=RokuPlayer")

And as shown above the XML is now JSON which the Roku app is not set up for, so it will continue to "can't parse feed" until thats changed.
There could be other changes, but thats what i saw. As Chris said, the oauth part still works.
Kinetics Screensavers
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.