Permalink
Browse files

Added README

  • Loading branch information...
1 parent 93c35f0 commit 87061fbb98315db7095697e3a7d693809577643d @mattfordham committed Nov 23, 2013
Showing with 40 additions and 0 deletions.
  1. +40 −0 README.md
View
@@ -0,0 +1,40 @@
+## Share ##
+### Facebook, Twitter, and Pinterest sharing made a little simpler. ###
+
+1. Include share.js
+2. Add these data attributes to your share links: `data-share-facebook`, `data-share-twitter`, `data-share-pinterest`
+3. Initialize the library: `Share.init()`
+4. Add some more data attributes to specifiy what gets shared (see below)
+
+### Data Attributes ###
+
+#### Facebook (simple) ####
+`data-share-link` The URL to share
+
+#### Facebook (advanced) ####
+`data-share-link` The URL to share
+`data-share-name` Name to use in share dialog
+`data-share-caption` Caption to use in share dialog
+`data-share-description` Description to use in share dialog
+`data-share-picture` Absolute URL to image to share
+
+#### Twitter ####
+`data-share-link` The URL to share
+`data-share-description` Text to share
+
+#### Pinterest ####
+`data-share-link` The URL to share
+`data-share-description` Text to share
+`data-share-picture` Absolute URL to image to share
+
+### Advanced Facebook Usage ###
+
+By default, the library will use the Facebook sharer URL (https://www.facebook.com/sharer/sharer.php?u=http://www.github.com). If you'd like more options, however, it can use the Facebook API's share dialog. To use this, initialize the library with the following options:
+
+```
+Share.init({
+ facebookAppID: YOUR_APP_ID,
+ facebookShareViaAPI: true
+})
+
+```

0 comments on commit 87061fb

Please sign in to comment.