FYI this won't work until this PR gets merged because Twitter/X now requires an additional magical token to be sent to the tweet fetching/syndication endpoint ⚠️
I had to change the URL format slightly to include the domain and also made it so that you can simply prepend https://vladimyr-posteval.web.val.run/ in front of the post URL. To give you an example:
It would be cool to have a bot for this, that answer with the output
FYI this won't work until this PR gets merged because Twitter/X now requires an additional magical token to be sent to the tweet fetching/syndication endpoint ⚠️
Luckily folks from Vercel reverse-engineered it as part of their
react-tweet
package: https://github.com/vercel/react-tweet/blob/a292ca7/packages/react-tweet/src/api/fetch-tweet.ts#L27-L31Great point!
I couldn't resist extending it to support Bluesky posts too, so here it is https://www.val.town/v/vladimyr/postEval 🎉
I had to change the URL format slightly to include the domain and also made it so that you can simply prepend
https://vladimyr-posteval.web.val.run/
in front of the post URL. To give you an example:To make it even easier to play with it here is a bookmarklet that will eval post you are currently viewing: postEval source code:
Since my bookmarklet code got sanitized:
This is awesome!!!
And your code is so simple
Thanks! When it comes to code my personal philosophy is unless it looks and reads like haiku - it sucks 😁 Coincidentally it fits nicely into the following narrative: https://en.wikiquote.org/wiki/Brian_Kernighan#:~:text=Everyone%20knows%20that,edition%2C%20chapter%202.