Reputation: 2534
I'm building my own Twitter share link as explained here:
https://dev.twitter.com/docs/tweet-button#build-your-own
The URL that I'm sharing will look something like this sample URL:
My question: How can I add text after the URL with some other information? The URL param sticks itself at the very end of the share string:
"I just shared my link using @eckroth - Check it out: http://www.google.com"
I want it to be something like:
"I just shared my link using @eckroth - Check it out: http://www.google.com - Some other text here!"
Upvotes: 0
Views: 1203
Reputation: 6120
Sorry, Joel, but you can't do that with the Web Intents API, which is what the sample URL you provided posts to. Check this out: https://dev.twitter.com/docs/intents.
If you scroll down to "Supported parameters", you'll see the description for the url parameter, which states that it will be shortened and "appended to the end of the tweet". So we have no control over where the URL goes if we give it to Twitter to take care of.
That said, you could simply include the URL in the text, yourself. Before Twitter made their own URL shortener, that's how we used to do it. Pass it through http://bit.ly or similar and then include the resulting URL wherever you want to in the text.
Note - the way your self-shortened links will be rendered on-screen in the timeline may not carry the same authority as a URL you pass to Twitter, though, so you may want to do both.
Good luck!
Upvotes: 1