Re: [twitter-dev] Tweet button fails to parse URL - query strings beginning with & rather than ?
On Fri, Jan 28, 2011 at 3:02 AM, JonM wrote: > The following URLs won't parse using the "tweet" button: > > "'url' parameter does not contain a valid URL." > > > http://www.pitchero.com/clubs/stockport/j/team-news-1249.html&news_id=247910 Well, that's not a valid URL. See the RFC. http://www.ietf.org/rfc/rfc1738.txt If you need a "&" right there, you'll have to encode it. > I expect this is because the string has an ampersand "&" rather than a > question mark "?" before the first GET variable. Yes. > Facebooks "share" and "like" functions both accept this formatting, as > do Google and Yahoo. My guess is that they are encoding the URL for you, and Twitter does not at this time. > Is there a reason Twitter's API does not? Is there any work around I > can use? Mainly security. We've seen people abusing the tweetbutton URLs in cross-site-scripting attempts and other forms of abuse. -j > Thanks > > -- > Twitter developer documentation and resources: http://dev.twitter.com/doc > API updates via Twitter: http://twitter.com/twitterapi > Issues/Enhancements Tracker: > http://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > http://groups.google.com/group/twitter-development-talk > -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Tweet button fails to parse URL
Thanks for letting us know about this John, i've let the team know so they can fix it. Best, Matt On Wed, Aug 25, 2010 at 2:29 AM, John wrote: > Hello, > > When I try and populate a Tweet button link with a data-url attribute > of the form: > http://www.wordnik.com/thesaurus/hen#w1=bird&w2=fowl > > I get the message: > "'url' parameter does not contain a valid URL." > > I first thought I needed to escape the ampersand, but after trying > every conceivable way of doing that, I instead replaced the # with > a ?, and it works fine. So it seems ampersands are only a problem when > there is no ?. > > This strikes me as a bug -- the url above is valid (it's using the > onhashchange event to save state). > > Is this a known issue, or is there a workaround for it, or am I > missing something here? > > Best, > John > > -- > Twitter developer documentation and resources: http://dev.twitter.com/doc > API updates via Twitter: http://twitter.com/twitterapi > Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > http://groups.google.com/group/twitter-development-talk?hl=en > -- Matt Harris Developer Advocate, Twitter http://twitter.com/themattharris -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk?hl=en