FixTweet / FxTwitter

Fix broken Twitter/X embeds! Use multiple images, videos, polls, translations and more on Discord, Telegram and others
https://fxtwitter.com
MIT License
2.62k stars 77 forks source link

Feature request: Indicate in the API response whether a Tweet is marked NSFW #268

Closed TheAppleFreak closed 1 year ago

TheAppleFreak commented 1 year ago

I'm working on an iOS Shortcut to take a link copied via the Twitter app and automatically rewrite it to use fx instead. Since on iOS proxy domains like fx don't open Twitter when you click on them within Discord, I want to be able to use the native Twitter embeds whenever possible (which realistically is text-only posts and single image posts). However, since NSFW images don't create embeds with default Twitter links, it'd be nice to have a way to differentiate between the two via the API to know when I need to use one domain over another.

dangeredwolf commented 1 year ago

Certainly. Would just passing through possibly_sensitive flag on tweets (which is account-wide) be sufficient?

dangeredwolf commented 1 year ago

I'd have to investigate it further but it would also be possible to pass through whether someone manually marked their media as sensitive, which is a different flag, however it's also one that not every NSFW account uses.

dangeredwolf commented 1 year ago

Anyway, I've deployed FixTweet now with the possibly_sensitive flag now. So let me know if that works!

TheAppleFreak commented 1 year ago

possibly_sensitive is only true on tweets that won't embed by default?

Either way, this is helpful. Thank you!

dangeredwolf commented 1 year ago

Presumably? Unless Twitter has some other criteria for what to show or not. I'll close the issue for now, but if this isn't sufficient then you can reopen it.

TheAppleFreak commented 1 year ago

Sounds like a plan!