I am attempting to get the Tweet entities (provided by "include_entities => true") processed by twitter-text-rb. I can't seem to get the entities passed into it in a way that works. Is there any documentation around this that anyone is aware of?
Yeah, I saw that... but what I can't figure out is how to get the entities in a format that twitter-text-rb will like. I feel like I must be missing something obvious... wouldn't almost anyone using the Twitter API need an easy way to process the entities?
I am trying to present the Tweets with clickable links and the original URLs displayed (not the t.co shortened links). Seems like twitter-text-rb's autolink method is what I am needing, but I can figure out how to feed in the entities in the right format. I would expect to do something like this:autolink(tweet.text, tweet.entities)
Yeah, I have looked at those docs. Autolinking without passing in the entities works for making things clickable, but it doesn't use the original link, it just makes the t.co link clickable. Without passing in the entities, how could the autolink method know the original link?
That's great... it gets me a lot closer.The only trouble with that approach, though, is that I can't get the rest of the entities linked, such as tags and user names. Once auto_link_entities runs on the text, the regular auto_link can't be used afterwards, as the indices are no longer accurate. The only solution I can think of is to pass in *all* the entities to the auto_link method, not just the URLs, but I can't seem to make that work.