Skip to content

Commit

Permalink
Added autolink example with urlEntities option.
Browse files Browse the repository at this point in the history
  • Loading branch information
smerchek committed Feb 4, 2012
1 parent de24a6f commit f31b48a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@ twitter.autoLink(twitter.htmlEscape('#hello < @world >'))
## Auto-linking Examples

twttr.txt.autoLink("link @user, please #request");
twttr.txt.autoLink("link @user, and expand url... http://t.co/0JG5Mcq", {
urlEntities: [
{
"url": "http://t.co/0JG5Mcq",
"display_url": "blog.twitter.com/2011/05/twitte…",
"expanded_url": "http://blog.twitter.com/2011/05/twitter-for-mac-update.html",
"indices": [
30,
47
]
}
]});

See https://dev.twitter.com/docs/tweet-entities for more info on tweet entities.


## Usernames

Expand Down

0 comments on commit f31b48a

Please sign in to comment.