Twitter bot calling js


#1

From my website I have some JS that posts a tweet to twitter to share a link.

On the page that the tweet links to is some client js that seems to be getting called upto 7 or 8 times each time I tweet a link out.

How can I stop this? I only want my js to run if someone actually clicks that link.

When I look in my IIS logs I can see entries for twitterbots. I’ve created a robots.txt on the root of my site with;
User-agent: *
Disallow: /

But each time I share a link from my site, I still get many hits from Twitter.

This doesn’t happen for Facebook or Google Plus which I also have the ability on my site to share a link to another page.

Can somebody please help me try work out what’s going on and what if anything I can do?

Thanks.
C


#2

Twitter requests information about a shared URI to discover Twitter Card markup for the URI and discover a canonical URI for link counts and other purposes. If you have recently updated your robots.txt file for all user agents or just Twitterbot allow time for Twitter to update its cache.

Regarding the JS on your page and fired events: can you be more specific about the events you are trying to capture? Are you running custom JS, or tying into Twitter’s widget-js events such as the tweet event?


#3

Hi Niall, thank you for the response.

When a user lands in my page, I extract some values from a query string, then I transfer the user using javascript to another site. I wanted to do this using Response.Redirect on the server… but that meant I didn’t get my analysis because FB / G+ would embed the eventual endpoint meaning I can’t tell how many people clicked the link.

The problem I now have is when I share a link via twitter, I get 8 or so false hits in my system because the bots are hitting my page with the query string many times. This doesn’t happen if authentication isn’t anonymous… but I need it to be because I don’t know where my users are coming from.

I’ve waited 24 hours and tried again today. Same thing. I will try again in a little while incase it hasn’t had time to take effect.

Really stuck on what to do though here.


#4

Bump,

I’d appreciate some form of response. How can I contact Twitter to find a resolution to my problem? This is a big deal for me.

The fact is Twitter is ignoring robots.txt