64

Literally I am looking for something like this:

https://developers.facebook.com/tools/debug/

But for Twitter Cards.

I put something wrong on my pages and I need them to be refreshed asap. But after google I only found this post:

https://dev.twitter.com/cards/troubleshooting

It seems Twitter only offers a weekly update. Is there any manual way to purge the wrongly cached pages?

Thanks

8 Answers 8

97

I just managed to force it to update mine:

https://cards-dev.twitter.com/validator

In validating it updates its cache.

6
  • 32
    This doesn't seem to work anymore. I recently switched from the "summary" card to "summary_large_image" yet the validator still reports that I'm using the former. I'm also getting spurious whitelist warnings for older blog posts.
    – Bower
    Aug 18, 2016 at 11:15
  • 2
    It didn't bust the cache for me.
    – ericso
    Oct 17, 2016 at 20:58
  • 1
    Worked for me, and THANKS!
    – Nello
    Jun 22, 2017 at 23:41
  • 3
    This is a misleading answer - since validator doesn't bust the cache Aug 25, 2017 at 12:00
  • 10
    It worked for me after validating twice. The first didn't do anything, but the second time busted the cache.
    – kichik
    Aug 31, 2017 at 19:58
24

There's actually a simpler solution than what is proposed by Twitter:

  • Go to https://cards-dev.twitter.com/validator
  • Type in the URL you want to update, BUT with a change. For example, add ?utm_source=Whatever
  • Then just reloaded page with whatever tweet had your Twitter card

When Twitter validator encounters this different URL, it clears its cache and fetches the new version.

1
  • Works for me, thanks! Also looks like there's some client side cache: have to refresh browser page for getting a new metadata while writing a new tweet
    – Adamovskiy
    Jul 19, 2022 at 15:23
19

Following the steps in Twitter Card's Troubleshooting Guide actually forced the cache to clear in my case.

When testing and/or iterating on Cards, it is sometimes helpful to test updates on your timeline. It may be possible to use the following technique to refresh the cache with your most up-to-date changes of your page’s Card.

  1. Add Card metadata to a page
  2. Tweet URL to that page
  3. Refresh your browser to view the Card contents on your timeline
  4. Change Card metadata on the page
  5. Take the same URL and runs it through bit.ly
  6. Tweet the new bit.ly URL
  7. Refresh your browser to view the updates

Additionally, you can create multiple bit.ly URLs to allow for repeat testing.

I generated a bit.ly link to the page, then tweeted it, and then quickly deleted that tweet. It cleared the cache right away for the other tweet.

2
9

I ran across the same problem.

I needed to update a cached summary_large_image and the

Twitter Card Validator (https://cards-dev.twitter.com/validator)

was showing zero interest in wanting to update the previously cached image.

I fixed it by ensuring that every time Twitter fetches the page, the image URI updates to something Twitter has never seen or cached before.

This is as simple as deploying the uniqid() function in PHP and using that as the query at the end of the image URI.

e.g.

<?php

echo '
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="http://example.com/my-twitter-image.png?'.uniqid().'">
';

?>

Since the image URI is different every time Twitter goes to fetch it, this forces the cache to update.

1
  • 2
    Doesn't work. Not even a change to the image filename itself will suffice.
    – arnoldbird
    Nov 29, 2018 at 15:50
3

There is a very simply way to force a cache invalidation of the Twitter Card bot.

If you are composing a tweet with an URL like https://example.com you only have to append a /# to the URL like so: https://example.com/# and it will immediatly fetch the updated metadata.

2
1

The only thing that helped me clear the cache was adding ?v1 to the end of the image URL:

<meta property="twitter:image" content="https://website.com/img/twitter.jpeg?v1" />
1
  • This does nothing for me.
    – 2540625
    5 hours ago
0

Haven't validated this approach but encountered this error twice and these steps seemed to force the update of the 'summary card':

  1. tweet link only (removing incorrect summary card from tweet composer)
  2. delete the tweet that shows the link only
  3. refresh twitter
  4. compose new tweet, pasting your link - should show updated/correct card image, title and subscription.
1
  • It does not work for me.
    – 2540625
    5 hours ago
0

Got to http://debug.iframely.com

Copy and past your url then click on the right side button. Example: Before was Tweet URL: https://bdprescription.com/entertainment/details/article/21/Full-Stack-PHP-Laravel-Vuejs-and-Angular-Developer/

Next update URL like this https://bdprescription.com/entertainment/details/article/21/Full-Stack-PHP-Laravel-Vuejs-and-Angular-Developer?(add unique number)

Add unique any number or string last position of url, which was not given before. "?(add unique number)" Then tweet new url

1
  • When I do this for a URL to a YouTube playlist, I get: Bad Request: Requested page error: 400
    – 2540625
    5 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.