Accessing TWTRTweetEntity inside TWTRTweet




there is existing topic which is locked now so I can’t write this question there.

I see that TWTRTweetEntity and subclasses of it are now public, but there are still no properties to them in TWTRTweet type, so how can someone access those entities from tweet?



Hey @tadija,

Currently, the underlying Entities aren’t accessible. Adding that is something we’ve been discussing adding in, but would love to know more about how you’re looking to use them so that I can share it internally.



Hey @bonnell, thanks for your answer.

Here’s a simple example:

I have a strong need for a custom Tweet View.
Entities like hashtags, user mentions, urls, or even media (which are in fact part of content for some TWTRTweet), should be sort of highlighted or able to receive some action inside of this custom tweet view.

I’m trying to avoid manual parsing and recognition of these entities because of 2 reasons:

  1. It’s not in the interest of very good performance and it’s easy to have some edge case parsing errors
  2. This data is already there, correctly parsed by Twitter, returned by REST API in JSON, saved in TwitterKit (but unfortunately it’s private).

If this data was just public, it would open a lot of possibilities, possibly new ideas, or at least simplify and increase quality of some processes for developers that are using TwitterKit.

Thank you for sharing this internally.



Thanks @tadija, really appreciate your additional thoughts on this! Will be sure to share them and keep the feedback coming. Happy coding :slight_smile:


Is there any news on this @bonnell. Getting access to entities will be really useful as @tadija mentions.


Hey @itsrealannjawn, I no longer work on the Twitter SDK, so I’m uncertain of any changes within the past year with the Twitter 3.0 release.