Avoid opening Twitter a new window


#1

Hi,
I am trying to have twitter button implemented on my mobile site and have used the below code to achieve this. However, this always forces the twitter to open in a new window rather than the same window. Is there any way I can force twitter to open in the same window?

<a href="https://twitter.com/share" target="_parent" class="twitter-share-button" data-url="My_Site_URL" data-dnt="true" data-count="none" data-via="">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

#2

If you use the Tweet Button, Twitter will control how the window opens. If you want the flow to open in the same window, you’ll need to not use the Tweet Button but use a tweet web intent instead: [node:183]


#3

#4