11

Twitter Web intents provides convenient JS lib to allow the user to tweets from an external website.

  <script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>
  <p><a href="https://twitter.com/intent/tweet?text=textToTweet">link</a></p>

This works great on mobile browser by openining a new window with twitter's textarea for the user to submit its tweet. Once tweeted the popup close and the user is back on the original page.

However in the context of a native app using webviews (a good example is facebook webview) the flow seems to be broken. Rather than opening a popup or new window it redirect the current webview to twitter page. From there there is no way for the user go back to the original page.

Is there any parameter that i could pass to https://twitter.com/intent/tweet for twitter to redirect back to the user page after tweeting or canceling. I have tried to use twitter @anywhere as well but the tweetbox does not even display on iOS UIWebview.

Is there any alternative for client side only flow ?

Towkir
  • 3,889
  • 2
  • 22
  • 41
seb
  • 425
  • 5
  • 16
  • Hi @seb, could you manage to do this in anyway ? I am in same situation now. – cgr Sep 28 '16 at 11:30
  • unfortunately i have not found anything yet, twitter still does not offer a way to redirect back. – seb Sep 29 '16 at 21:56

0 Answers0