Twitter Web Intents inside iOS / Android Webview - any redirect / callback url?

Twitter Web Intent provides a convenient JS library to allow users to tweet from an external site.

<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 in a mobile browser, opening a new twitter window so that the user can tweet. After the tweet closed, the user returned to the original page.

However, in the context of a native web browsing application (a good example is Facebook web browsing), the stream seems to be disrupted. Instead of opening a popup or a new window, it redirects the current web view to a Twitter page. From there, the user cannot return 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 a tweet or cancellation. I also tried using twitter @anywhere, but the tweetbox doesn't even display in iOS UIWebview.

Is there any alternative for client thread?

+8
source share

Source: https://habr.com/ru/post/918913/


All Articles