TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Twitter is using its embedded JavaScript to hide tweets that have been deleted

408 pointsby epeusabout 3 years ago

40 comments

tofuahdudeabout 3 years ago
You don&#x27;t need to use Twitter&#x27;s JS to show Tweets. If you choose to use their system, you&#x27;re subject to their rules. If you don&#x27;t like their rules, don&#x27;t use their stuff.<p>Calling it &quot;altering the public record&quot; is a little hyperbolic imo. If you want to act as a repository for the public record, you better use your own system. Twitter is under no obligation to retain this kind of stuff on your behalf.<p>I&#x27;m not trying to say that this is right or wrong, just that these are the facts of the matter when you engage with a company&#x27;s code and terms of service.
评论 #30929330 未加载
评论 #30930105 未加载
评论 #30930041 未加载
评论 #30930972 未加载
评论 #30930898 未加载
评论 #30930120 未加载
评论 #30930937 未加载
评论 #30929272 未加载
评论 #30931573 未加载
blendergeekabout 3 years ago
I see so many people here arguing that by embedding javascript directly from Twitter, you are accepting whatever they choose to make that javascript do. While that is true to an extent, Twitter has provided documentation for this javascript that says that if the Tweet gets deleted, the javascript will simply stop styling your quote of the tweet that you have on your website.<p>By changing the behavior of the javascript, without even updating the documentation, Twitter has broken every rule of being a good distributor of third-party code. In a similar vein, any third party code could at any time do any number of malicious things. Just because I didn&#x27;t pay Twitter for the privilege of running their code and just because I embedded their code in my website does not make it okay for them to start distributing malware to modify my website to their liking.<p>There are lots of other malicious things Twitter could have the javascript do. Twitter could start showing ads before and after all quoted tweets. This would also conflict with the documentation and would be malicious.
评论 #30931560 未加载
WatchDogabout 3 years ago
Functionality aside embedding random scripts from twitter seems like a big risk for security and privacy.<p>At a minimum, it should probably be embedded in a sandboxed iframe.<p>Just taking a screenshot, and linking to the tweet, seems like a more robust solution, that won&#x27;t randomly stop working, and doesn&#x27;t have the same privacy issues.
评论 #30929393 未加载
评论 #30929491 未加载
评论 #30929242 未加载
评论 #30929235 未加载
评论 #30929547 未加载
评论 #30929453 未加载
car_analogyabout 3 years ago
How long until people realize sites like Twitter are actively hostile, and embedding their scripts is equivalent to letting the Trojan horse through your gates?
评论 #30928971 未加载
paxysabout 3 years ago
Why not just copy paste or screenshot the Tweet? It&#x27;s bizarre to reference a script from twitter.com directly in your site&#x27;s source code and then complain that the script is doing exactly what it is supposed to.
评论 #30929467 未加载
评论 #30929303 未加载
评论 #30929701 未加载
评论 #30929694 未加载
rifficabout 3 years ago
fix the title please<p>An apostrophe as a possessive marker in its is nonstandard:<p><a href="https:&#x2F;&#x2F;en.m.wiktionary.org&#x2F;wiki&#x2F;it%27s#Etymology_2" rel="nofollow">https:&#x2F;&#x2F;en.m.wiktionary.org&#x2F;wiki&#x2F;it%27s#Etymology_2</a>
评论 #30929529 未加载
评论 #30929208 未加载
评论 #30929294 未加载
slaterabout 3 years ago
FYI if you block their JS on third-party sites, it works fine:<p><a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;cb5Lyd5.png" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;cb5Lyd5.png</a>
评论 #30928487 未加载
评论 #30929292 未加载
评论 #30929281 未加载
评论 #30931933 未加载
jazzyjacksonabout 3 years ago
It&#x27;s a shame there&#x27;s no better way to preserve a tweet than taking a screenshot -- there&#x27;s no way to prove that an individual said something, save for perhaps trusting the record on archive.org<p>It doesn&#x27;t have to be this way. Either the individual or the platform could cryptographically sign content to prove that it really happened. I guess Twitter would prefer a plausible deniability. If anyone screenshots you saying something you regret, you can just say it was forged.
评论 #30929709 未加载
评论 #30929716 未加载
评论 #30929847 未加载
thunderbongabout 3 years ago
Isn&#x27;t this the way the internet is supposed to work? If I link to a page and the page is removed, it&#x27;ll not show, right? Same thing if I were to add that page as an iframe on my site.<p>So, IMHO, the title and the post doesn&#x27;t make any sense. Twitter isn&#x27;t editing anyone&#x27;s site. You have chosen to embed some content of Twitter on yours and it is perfectly fine if they chose to remove it.
评论 #30929478 未加载
评论 #30929571 未加载
评论 #30929562 未加载
ki_about 3 years ago
hmm. Personally i think when u delete a tweet, you should not be able to embed it. If you changed your mind about a tweet, you should be able to decouple it from your account. If people want to refer to tweets, how about a screenshot? It&#x27;s safer, faster and cant 404 when twitter is down.<p>And i think the whole &quot;they edited my page&quot; statement is ridiculous. You EMBED a part of twitter into your page. You know it can change. If you embed a youtube video, and the owner deletes it, it wont play anymore. obviously.
评论 #30929892 未加载
评论 #30935873 未加载
评论 #30936005 未加载
oaueaabout 3 years ago
So twitter is distributing malware now?<p>Malware is defined by Wikipedia as:<p>&gt; Malware (a portmanteau for malicious software) is any software intentionally designed to cause disruption to a computer, server, client, or computer network, leak private information, gain unauthorized access to information or systems, deprive users access to information or which unknowingly interferes with the user&#x27;s computer security and privacy.<p>This script distributed by twitter is software intentionally designed to cause a disruption to a server and to deprive users access to information.
ThePhysicistabout 3 years ago
Well, any third-party script that you embed on your website can edit your site and do many other nefarious things (key logging, credential stealing, ...). I never got how people can just copy&#x2F;paste some random JS into their own websites (often without even using integrity tags). Social embeds in particular have turned the web into a surveillance machine for large corporations, as every FB&#x2F;Twitter&#x2F;Instagram&#x2F;... embed tracks users across every web property that has such an embed, and until very recently almost every major website had such embeds.<p>Luckily GDPR seems to have a chilling effect on recklessly embedding such stuff without thinking about privacy or security implications. Personally I hope that in a few years third-party embeds will mostly be a thing of the past.
评论 #30929644 未加载
评论 #30929486 未加载
ChrisArchitectabout 3 years ago
Don&#x27;t like the &quot;Twitter Edits You&quot; title of the article. Sensationalist&#x2F;misleading.<p>Tweet embeds are a live link to the Twitter system to show a tweet. To show the actual tweet from the Twitter platform. If the tweet doesn&#x27;t exist, there&#x27;s nothing to show. No one said it should maintain some kind of &#x27;copy&#x27; of old data on your site.
评论 #30935968 未加载
taspeotisabout 3 years ago
I am not particularly upset by this. You choose to embed JavaScript that interoperates with your website to make tweets look like Twitter … Twitter has decided that deleted tweets look like nothing now … that’s what you wanted.<p>Apparently the “contract” that Twitter would preserve the text of a deleted tweet was a tweet from some random employee.
评论 #30930668 未加载
WorldMakerabout 3 years ago
This seems to me like an improvement for systems that don&#x27;t have blockquotes in their embedding source (previously the behavior was that if there was no HTML inside the embedding element there was no fallback at all and it was just an empty element) that was an accidental regression.<p>I hope they add a simple check if the element has children or not to fix the regression, but I work on an app where some sort of fallback UI for deleted Tweets is a welcome change, even if &quot;blank Tweet card&quot; isn&#x27;t a huge improvement, it&#x27;s still a small win to get some hard-to-fix-on-our-side UI complaints off the backlog.
account-5about 3 years ago
Disclaimer: I&#x27;m not a web developer nor a journalist&#x2F;blogger, whatever.<p>My non-expert, likely useless, take on this:<p>Don&#x27;t use Twitter&#x27;s technology. If you&#x27;re interested in quoting a tweet to create a public take a screenshot, copy of the text, quote it and provide a link. Simple.<p>If part of your post links, or portals, to another site you don&#x27;t control it&#x27;s not part of your blog&#x2F;post&#x2F;site. Complaining when remote content changes is pointless. You&#x27;re not capturing what was when you link to remote content managed by someone else you&#x27;re capturing something live, it&#x27;s not a public record. It isn&#x27;t quoting anything.
评论 #30930623 未加载
gumbyabout 3 years ago
Implicitly, when you quote a tweet you are agreeing to a contract of adhesion (basically a shrink wrap license or &quot;by using this site you agree to our terms&quot;). Twitter even told people that the quoted text would remain.<p>Now site ToS usually say that they can change the terms whenever they want. But that&#x27;s going forward: something you wrote in the past should be under the contemporaneous terms.<p>So I wonder if someone could successfully sue under California law. If successful, it would be a great improvement to consumer rights.
bussettaabout 3 years ago
Would it have been better if Twitter had announced this change and made the change only for the new tweets and left the existing ones as is?
评论 #30929777 未加载
raverbashingabout 3 years ago
* its embedded javascript<p>(it is correct on the site itself)<p>&gt; That widgets.js script looks for blockquotes with the class=&quot;twitter-tweet&quot; on, and replaces them with a Twitter branded iframe to confirm that it is a real tweet<p>And that&#x27;s how most libraries work? I don&#x27;t see an issue. Yes, if you delete the tweet it seems they changed the behaviour (and that might be an actual bug) but still...
jdrcabout 3 years ago
Oh boy wait until you see what adsense does
评论 #30929267 未加载
fay59about 3 years ago
It kinda sucks, but “tampering with the public record”? Is Twitter liable for holding the public record now?
dheeraabout 3 years ago
Just screenshot them instead of embedding them.<p>If you cared about JS injection why would you embed anything?!
评论 #30929708 未加载
throwuxiytayqabout 3 years ago
Why do you people even use Twitter? It&#x27;s one giant pile of crappy content and dark ux patterns. What did you expect? That they&#x27;d play nice forever? Are you really new to this? Did your preschool not have a sandbox?
ec109685about 3 years ago
This is so stupid on twitter&#x27;s part. It&#x27;s obviously easy for publishers to work around by including both the blockquote of the tweet (unadorned), plus the version w&#x2F; the twitter embed class.<p>End result will be much uglier pages.
dustinmorisabout 3 years ago
This is why I never use these iframe widgets. They are not only useless and untrustworthy, they are also damn slow. I take a screenshot of the tweet I want to reference, put it into a bucket behind a CDN and then embed an &lt;img&gt; of the tweet inside an &lt;a&gt; which links back to the tweet. If the tweet gets deleted then the link will break and users will see that the tweet was deleted, but my screenshot stored on my own servers will remain forever and my website will continue to make sense.<p>Own your data, own your blogs, own your words, own what you create&#x2F;write&#x2F;do on the web. Don&#x27;t rely on third party services uphold a common sense contract or what most people would expect is the ethical&#x2F;correct&#x2F;good thing to do.
rini17about 3 years ago
Looks we need something server-side to fetch content from twitter&#x2F;etc. once when article is published and then serve that copy.<p>I can see the publishers unhappy and actively obstructing such a solution though.
tester89about 3 years ago
Someone should probably just come third-party CSS&#x2F;JS to emulate the tweet look that twitter had without importing twitter&#x27;s JS.
jdrcabout 3 years ago
Are we going to have a lot of similar posts? This sounds like expected bevahiour if you&#x27;re inserting someone&#x27;s JavaScript in your page
mlatuabout 3 years ago
i&#x27;d just boycott using widgets.js<p>maybe there should be an open and distributed ACTUAL public record? have we finally found an actual usecase for blockchains?
meatsauceabout 3 years ago
Unless you commit and are convicted of an actual crime with your tweet, nothing - absolutely nothing - should result in a blanket ban or deletion of your post. And no, insulting the embedded bloodsuckers that hold congress (and our lives) in an iron grip is not a crime.<p>We need to go back to the days when sticks and stones broke bones; when words were correctly not &quot;violence&quot; and that your right to not be insulted existed solely in that self-important (but empty) cavern between your ears.
评论 #30931996 未加载
TomGullenabout 3 years ago
BBC website frequently embeds Tweets, wonder how long until we start seeing edits on them to promote websites or something.
评论 #30929551 未加载
iepathosabout 3 years ago
The real problem imo is twitter allowing people to delete their tweets at all. They need a no takesy backsies policy.
评论 #30929212 未加载
评论 #30929170 未加载
smokey_circlesabout 3 years ago
&gt; Tampering with the public record<p>Oh come off it already. What a remarkably brain dead opinion.<p>Twitter _is not a public utility_. It owes you _nothing_. Their property, their decision. That simple.<p>I do have an issue with the idea of their JS manipulating your own website but fuck off with this &quot;Twitter is a public service&quot; argument.<p>- They don&#x27;t have to give you an account<p>- You are not entitled to make demands of them<p>- You can always use another service<p>Goddamned children. Enough already.
评论 #30929874 未加载
peanut_wormabout 3 years ago
why dont you just remove the javascript so they appear as blockquotes? seems a bit dramatic. dont think i would expect twitter to show deleted tweets in the first place, id probably just use a screenshot if its something that i think might be removed.
parksyabout 3 years ago
If permanency is a priority then letting external scripts be responsible for presenting content is not a good idea, especially if the agreement doesn&#x27;t make any promises about whether content will be permanent, and doubly so if the agreement &#x2F; terms of service explicitly say they can change the behaviour of their services at any time.<p>What this probably calls for and maybe something is out there is some service that can embed, archive, and track changes to a tweet or social media post. You&#x27;d embed the same way, but the archive will fetch and cache the content. It could then serve up the original version, as well as a timeline of changes.<p>The right to be forgotten has merit though, and I can see twitter&#x27;s logic there and probably they&#x27;re under pressure via GDPR or something. So any archival or cache service would need to take that into account. Various countries and districts have varying laws on what is and isn&#x27;t official public record too, so it seems like managing that could be the function of a dedicated archival service.
vixen99about 3 years ago
Should read &lt; its embedded Javascript &gt;
demarqabout 3 years ago
&gt; However, Twitter has broken this API contract.<p>What contract?
评论 #30930695 未加载
Cgwftsnabout 3 years ago
٥اتعتاقر٧و
iforgotpasswordabout 3 years ago
I&#x27;ve never understood why people even wanted to use this. For the styling? So you can just copy some random stuff from Twitter and it looks like Twitter but is also interactive?<p>Just with the Facebook like-Button, you&#x27;re exposing your visitors to the tracking of Twitter.<p>For what? Just so you can quickly copy one snippet and be done with it, instead of manually copying author name, content and link and spending 10 seconds to format this yourself.<p>I wish I had something constructive to say, but this always seemed like a totally unnecessary &quot;feature&quot; with a lot of downsides. Instead of embedding 280 characters in your website you make it download an order of magnitude more from somewhere else and then execute code to display those characters in a way someone else deems appropriate.
评论 #30929516 未加载
评论 #30929630 未加载
评论 #30929415 未加载
评论 #30929608 未加载
评论 #30929617 未加载
评论 #30929792 未加载
评论 #30929543 未加载
Zardoz84about 3 years ago
Omg... the thing about cited deleted tweets becomin a white glob, gives me some vibes of 1984&#x27;s &quot;rewriting history&quot;.
评论 #30929703 未加载