Twitter Timeline in PhoneGap application
This is a dead simple service that allows to easily integrate an embedded twitter timeline to the PhoneGap native application.
The solution has been tested on PhoneGap 3.1.0 for iOS and Android versions.
Add InAppBrowser PhoneGap plugin to your application.
If you're using PhoneGapBuild service, add the following to the config.xml:
<gap:plugin name="org.apache.cordova.inappbrowser" />
If you're using Command Line tools run:
cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-inappbrowser.git
In your PhoneGap js file open InAppBrowserWindow with the twitter timeline:
window.open(encodeURI('http://k-rudy.github.io/phonegap-twitter-timeline/?roodyruby'), '_blank', 'location=no');
roodyrubyin the url with the twitter username / hashtag of the page you want to embed
If you're using the first version of the service and getting Github 404 Not Found error, you should put slash
/in front of
?before your widget id in the widget URL. This is caused by changes in the way Github Pages process parameters. More Details
If you are using the second version of the service, and are getting blank screen instead of the timeline, you might need to replace
twitter_pagein the url, as things are way simpler now. More Details