Created
November 5, 2013 21:35
-
-
Save maxfenton/82a9843ceac7fa0a7493 to your computer and use it in GitHub Desktop.
Unofficial twitter API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <footer class='article-footer'> | |
| {% if current.meta.footer %}{{ current.meta.footer | md }}{% endif %} | |
| {% capture tweet_text %}I thoroughly enjoyed this post > "{{ current.title }}":{% endcapture %} | |
| <a class='tweet-button' href='https://twitter.com/intent/tweet?original_referer={{ current.permalink | escape }}&text={{ tweet_text | escape }}&tw_p=tweetbutton&url={{ current.permalink | escape }}&via={{ site.meta.twitter }}' target='_blank'><span class='ss-icon ss-social-regular'>twitter</span><span id='twitter-count' class='count'></span></a> | |
| <script> | |
| function count_callback(data) { document.getElementById('twitter-count').innerHTML = data.count; } | |
| var script = document.createElement('script'); | |
| script.setAttribute("src", 'http://urls.api.twitter.com/1/urls/count.json?callback=count_callback&url={{ current.permalink | escape }}'); | |
| document.getElementsByTagName("head")[0].appendChild(script); | |
| </script> | |
| </footer> |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
via https://github.com/destroytoday/destroytoday.com/blob/master/_includes/article-footer.html#L8