2

I am working on integrating twitter Widget in a tab of a Cordova application. I am using Cordova with Angularjs and ionic Framework.

I have obtained the API key needed in order to instantiate the widget and after a few attempts I got it. I attach one image (twitter in tab)

In order to do that, I create a tab, put the javascript in the main .html file and the link. So far, ok:

     <a class="twitter-timeline" href="https://twitter.com/hashtag/mwc2015" data-widget-id="XXXXXXXXXXXXX"></a>;

But, the "show" begins when the user clicks on the twitter widget. If you want to retweet, tweet something or whatever, twitter widget opens a new page, pop up, which is placed on top of cordova app, and then, user can not go back. Device Back button doesn't work. You can register and send a tweet, but always this new window is on top. I attach an image to show what the user see in the screen when any button is clicked. twitter on top

So, you should kill Cordova app and start again.

I was wondering if someone knows how integrate the widget and the "children " pages of them , or if a javascript alternative to change target parameter of all links inside widget.js in order to open new windows inside the app.

Thank you so much.

DavidR.
  • 93
  • 6

1 Answers1

1

I have experienced the same issue with Instagram, but I hope it can help as well. First of all, please install cordova InAppBrowser plugin.

cordova plugin add cordova-plugin-inappbrowser

Then try to modify your config.xml file with following, adding it before platforms tag:

 <allow-navigation href="about:*" />