Count not working for url's with 2+ parameters

140 views
Skip to first unread message

Lukas

unread,
Aug 29, 2010, 6:11:03 PM8/29/10
to Twitter Development Talk
Hi

The tweet button does not count if the data-url has more than 1 url
parameters
http://www.jobscout24.ch/JS24Web/JobView/JobDetail.aspx?lng=de&wl=1&jid=1979742
(this is the canonical url)

The request to the count api takes only the last one of the parameters
into accout, all the others are lost ;-(

Is there a workarouond for this issue (none of the encodings i tried
seems to work, even with use of data-counturl) or does anyone know if
theres a fix planned for this?

Thanks
Lukas

Matt Harris

unread,
Aug 30, 2010, 7:11:12 PM8/30/10
to twitter-deve...@googlegroups.com
Hey Lukas,

The Tweet Button currently allows you to share one URL at a time.
Can you give an example of what you require two URLs on one button for?

Best,
Matt

> --
> 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

abilek

unread,
Sep 2, 2010, 6:16:10 PM9/2/10
to Twitter Development Talk
If I understand Lukas correctly, he doesn't want to send two URLs. He
wants the count to work properly on URLs with more than two
parameters.

The count API seems to be stripping out all but the first URL param.
So if you have a page

http://www.example.com/page.html?param1=foo&param2=bar

the count API counts http://www.example.com/page.html?param1=foo - not
the proper URL. Even if you set the canonical URL in the data-counturl
attribute.

Cheers,
anne

On Aug 31, 11:11 am, Matt Harris <thematthar...@twitter.com> wrote:
> Hey Lukas,
>
> TheTweetButtoncurrently allows you to share one URL at a time.
> Can you give an example of what you require two URLs on onebuttonfor?
>
> Best,
> Matt
>
>
>
> On Sun, Aug 29, 2010 at 3:11 PM, Lukas <lukas.winzenr...@gmail.com> wrote:
> > Hi
>
> > Thetweetbuttondoes not count if the data-url has more than 1 url
> > parameters
> >http://www.jobscout24.ch/JS24Web/JobView/JobDetail.aspx?lng=de&wl=1&j...

Lukas

unread,
Sep 3, 2010, 8:41:07 PM9/3/10
to Twitter Development Talk
Hey Matt

The problem I have is exactly what abiled described, thanks for
clarification.

Url: (used in data-url, data-counturl of the tweet button and set as
canonical in page head)
http://www.domain.com/page.html?a=1&b=2

The widget sends the following request to the count api:
GET http://urls.api.twitter.com/1/urls/count.json?url=http://www.domain.com/page.html?a=1&b=2&callback=twttr.receiveCount
HTTP/1.1

And gets the response:
twttr.receiveCount({"url":"http://www.domain.com/page.html?
a=1","count":0})

Tweeted Url: http://www.domain.com/page.html?a=1&b=2
Counted Url: http://www.domain.com/page.html?a=1

--> Count stays 0 since the url counted differs from the tweeted url.

Cheers Lukas

On 31 Aug., 01:11, Matt Harris <thematthar...@twitter.com> wrote:
> HeyLukas,
>
> The Tweet Button currently allows you to share one URL at a time.
> Can you give an example of what you require two URLs on one button for?
>
> Best,
> Matt
>
>
>
>
>
> On Sun, Aug 29, 2010 at 3:11 PM,Lukas<lukas.winzenr...@gmail.com> wrote:
> > Hi
>
> > The tweet button does not count if the data-url has more than 1 url
> > parameters
> >http://www.jobscout24.ch/JS24Web/JobView/JobDetail.aspx?lng=de&wl=1&j...
> > (this is the canonical url)
>
> > The request to the count api takes only the last one of the parameters
> > into accout, all the others are lost ;-(
>
> > Is there a workarouond for this issue (none of the encodings i tried
> > seems to work, even with use of data-counturl) or does anyone know if
> > theres a fix planned for this?
>
> > Thanks
> >Lukas
>
> > --
> > 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, Twitterhttp://twitter.com/themattharris- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -
Reply all
Reply to author
Forward
0 new messages