Cant fetch activity embeds
curl -A "Discordbot/2.0" "https://fxtwitter.com/majin_kz/status/1928552476589932644"
Gives me an activity embed link:
<link href='https://fxtwitter.com/users/majin_kz/statuses/66086667665361546057575456595857606161555458565666' rel='alternate' type='application/activity+json'>
curl -A "Discordbot/2.0" -v "https://fxtwitter.com/users/majin_kz/statuses/66086667665361546057575456595857606161555458565666"
Just gives a 302 redirect to https://github.com/FxEmbed/FxEmbed?
Can see in https://github.com/FxEmbed/FxEmbed/blob/main/src/realms/twitter/router.ts that nothing matches that URL, it wants https://fxtwitter.com/api/v1/statuses/66086667665361546057575456595857606161555458565666 (which does work).
No idea how discord is working with this? Unless they have special handling to derive the API url themselves.
Correct—Discord is manually calling the API instead of fetching the url itself. It also only accepts numbers and does not pass through other information like query strings, which is why we use https://github.com/FxEmbed/FxEmbed/blob/main/src/helpers/snowcode.ts so we can encode other flags.
I wouldn't recommend trying to use the activity endpoints directly though, you should use our API instead: https://api.fxtwitter.com
We are using the same API internally so there isn't a benefit to scrapping using the activity endpoint
Not looking to integrate with FxEmbed specifically, just activity embed support. Since it would be nice to have the extra styling and link information that the activity embed provides.
Why not add a handler so the activity endpoint that's given is actually functional, idk what purpose it has being broken and needing special handling.
Difference between normal and activity embed.