Discussion Forums  >  Grunts, Groans, Complaints

Replies: 3    Views: 86

AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
01/25/13 02:31 PM (11 years ago)

Twitter on Android

I'd like to show a Twitter page in my app, it sounds simple but it is proving to be tough. Links from custom URL plugin or html doc plugin works in IOS and would be fine but it does not work on Android. Using browser from launch native app works, but that isn't ideal as it jumps out of the app. I've managed to set up an RSS feed, but I understand twitter are ceasing support for RSS in March, so that isn't ideal. Does anyone know a good way to show twitter pages?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/25/13 03:37 PM (11 years ago)
And please, let me know if you find one. Facebook? No problem. iOS? No problem. Android? No Twitter. What's up with that? I've probably tried all the same tricks you have... I've finally just yanked the twitter links on my Android side... until I can find a cure. If I find one, I'll let you know. If you find one, please let me know! Cheers! -- Smug
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
02/06/13 11:09 PM (11 years ago)
Thought I'd share my work around. It's not perfect, but seems to work pretty well. There are three parts: 1. Your twitter url 2. A url from RSSInclude.com 3. A html file with a redirect script 1. Get your twitter url in fhis format: http://mobile.twitter.com/YOUR_TWITTER_NAME 2. Create a RSS box at rssinclude.com You'll need to get the twitter feed's rss using the following link: https://api.twitter.com/1/statuses/user_timeline.rss?screen_name=TWITTER_HANDLE Paste that into the Input Feed of the RSS box. Once you're happy with the formatting, get the snippet (use the DirectLink). (Suggestion: Do not set the 'Width of Box' and it will adjust dynamically depending on the device). 3. Create a html file with the following script inside it: <script type="text/javascript"> // <![CDATA[ if ( (navigator.userAgent.indexOf('Android') != -1) ) { document.location = "RSS_INCLUDE_URL"; } else { document.location = "http://mobile.twitter.com/YOUR_TWITTER_NAME"; }// ]]> </script> Then upload the html file to your server or dropbox. Place the url to your html file into a custom url page in your app. iOS devices will open the mobile twitter feed and Android devices will open the RSS Box. Try it out.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
02/07/13 03:06 AM (11 years ago)
Hi @MrGoBlue, I like it, particularly the tip on not putting in the width into rssinclude and your redirection code, 2 definite enhancements I had not previously considered. However, I understand that Twitter are dropping support for RSS in a few weeks time, which I think means we will be back to square one?! Alan
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.