Tweet button with NO URL in the tweet?


#1

I’m trying to use the iFrame version of the tweet button, and I’d like a suggested tweet where Twitter doesn’t add a URL at the end.

Using the javascript version, I’ve successfully used code like this:

<a href="http://twitter.com/share" class="twitter-share-button" data-text="Here is a tweet that I'd like not to have a link at all!" data-count="vertical" data-url=" " data-counturl="http://google.com">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>

And I’ve used just a plain URL version like this:

<a href="http://twitter.com/share?text=Here+is+a+tweet+that+I%27d+like+not+to+have+a+link+at+all!&counturl=http%3A%2F%2Fgoogle.com&url=">Here is a tweet that I'd like not to have a link at all!</a>

I’ve done both of those by passing a blank url parameter, and Twitter responds great. But using the iFrame version, it doesn’t seem to work! Any ideas on how to get this working?

Here’s my code:

<iframe allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/tweet_button.html?text=Here%20is%20a%20tweet%20that%20I%27d%20like%20not%20to%20have%20a%20link%20at%20all%21&count=vertical&counturl=http%3A%2F%2Fgoogle.com&url= " style="width:55px; height:62px;"></iframe>

Custom Tweet Button without URL?
#2

What do you mean by “doesn’t work”? The URL you’re passing to the iframe
http://platform.twitter.com/widgets/tweet_button.html?text=Here+is+a+tweet+that+I’d+like+not+to+have+a+link+at+all!&count=vertical&counturl=http%3A%2F%2Fgoogle.com&url=

creates a button which launches an intent containing only the text “Here+is+a+tweet+that+I’d+like+not+to+have+a+link+at+all!”, which, aside from having the spaces encoded incorrectly (they should be %20) looks to be what you wanted.


#3

Huh…adding the http:// in my code instead of // did it! Thanks!


#4

Hm, actually, no, it’s not working consistently. Here’s a test page:

The embedded iframe does not work – it adds the referring URL to the end of the tweet. But taking the iframe source URL (shown below) and putting it into a browser window creates a button that does indeed work. Why the difference?


#5

hi, I have the problem for share button count pls help me anybody… give the solution for me…


#6

To avoid sharing the url of the WebPage just give to the button a wrong one like http://wrong. The Twitter code will try to add the url failing and so leaving your post as desired. For an example try to share a tweet from luigitiburzi.com. There inspecting the code you can also find a complete example of a dynamic Twitter button


#7

#8

#9

#10