Hm, looks like you have a <link rel=“canonical” href="" /> element in pages which detect the link incorrectly. In pages which do detect the link, the href attribute is correctly populated. If no data-url is specified in the Tweet button, the Twitter script looks at the link rel canonical element to find the “official” URL of the page.