Unable to embed timeline in Ionic App


#1

We are developing an iPad app, in which need to embed twitter timeline widget for a user. Using the embed code, we are unable to see user timeline widget on iPad app. Same code works in browser of iPad. It also works on desktop browsers.
We tried including jquery as well, for workaround discussed for loading script in views. Still nothing works … Any help ?


Twitter widget on iOS devices not rendered for ionic app
Tweet Widget not working in Cordova and iOS
#2

Twitter Kit provides native display of timelines on iOS using Objective-C or Swift.

If your framework restricts you to HTML and JavaScript you can choose to progressively enhance HTML on the page or create a new embedded timeline via a JavaScript factory function (example: user timeline).

An HTML-based app will need to load Twitter’s widgets JavaScript: https://platform.twitter.com/widgets.js . If your framework has a separate script dependency manager you may need to integrate Twitter as an external script to be loaded with your pages.


#3

As ionic framework restrict us to use HTML and javascript, we are using embedded timeline via a JavaScript factory function. As we tested it, it seems its loading the script widget.js as well. But widget creation do not occur. (Tested by binding events provided by twitter api). There is something that do not make it load inside iPad app. Same works on Android, as well as standalone browsers.
Is there something in widget.js that can conflict with Angularjs and ionic, as these are scripts that goes along the app as well ?


#4

Are you able to setup an asynchronous function queue for Twitter’s widgets JavaScript to flush once it is loaded? Create twttr._e as an array, with twttr.ready pushing passed functions into the array, as detailed in our JavaScript loading page.

Once you have created the asynchronous function queue you can pass new functions to twttr.ready for immediate or queued execution depending on the loading status of Twitter’s widgets JavaScript.


#5