Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create links to tweet text from entities (hashtags, links, mentions...) of Twitter REST API

I'm inserting tweets in one website, but i'm with a little problem to get the entities (hashtags, mentions, links...)

REST Api give us information about the entities, like we can see here https://dev.twitter.com/docs/tweet-entities

But, the api give me the indices of this entities in the string text (tweet), but, if i insert a link in this tweet, the other link will change, and make verifications from all cases will spend much time.

Someone know some way to do that, a easy one, or some plugin in jQuery or API that make this for us?

(P.S.: Sorry some error, i'm a brazilian developer and my english was not so good :D )

like image 405
evandrobm Avatar asked May 03 '12 16:05

evandrobm


2 Answers

Quick google yielded the following gist:

https://gist.github.com/442463

like image 180
mikeycgto Avatar answered Sep 28 '22 14:09

mikeycgto


Also have a look at this one: https://github.com/twitter/twitter-text-js

like image 26
bszom Avatar answered Sep 28 '22 13:09

bszom