Literally I am looking for something like this:
https://developers.facebook.com/tools/debug/
But for Twitter Cards.
I put something wrong on my page
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.
- Add Card metadata to a page
- Tweet URL to that page
- Refresh your browser to view the Card contents on your timeline
- Change Card metadata on the page
- Take the same URL and runs it through bit.ly
- Tweet the new bit.ly URL
- 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.
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.
I just managed to force it to update mine:
https://cards-dev.twitter.com/validator
In validating it updates its cache.
There's actually a simpler solution than what is proposed by Twitter:
?utm_source=Whatever
When Twitter validator encounters this different URL, it clears its cache and fetches the new version.