Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #41 from smerchek/master

Added an autoLink example for using urlEntities to the readme
  • Loading branch information...
commit 917a8286884140ceae5ebe76031284601b68dffd 2 parents 161a90b + d574720
@keitaf keitaf authored
Showing with 16 additions and 0 deletions.
  1. +16 −0 README.md
View
16 README.md
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.