Permalink
Browse files

Merge pull request #41 from smerchek/master

Added an autoLink example for using urlEntities to the readme
  • Loading branch information...
Keita Fujii
Keita Fujii committed Mar 28, 2012
2 parents 161a90b + d574720 commit 917a8286884140ceae5ebe76031284601b68dffd
Showing with 16 additions and 0 deletions.
  1. +16 −0 README.md
View
@@ -22,6 +22,22 @@ 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,
+ 48
+ ]
+ }
+ ]});
+
+See [Tweet Entities](https://dev.twitter.com/docs/tweet-entities) for more info getting url entities from Twitter's API.
+
## Usernames

0 comments on commit 917a828

Please sign in to comment.