Websites/The Open Standard/zurb tech specs: Difference between revisions

Jump to navigation Jump to search
Line 36: Line 36:
* Google+
* Google+


=== Querying Shares Per URL ====
We should be able to query the number of shares a url has on demand and without leaking user data. The following are example api calls that return the number of shares for a specific URL.
Note we should check if there are any API limits or other funky restrictions, if so we should cache these at a reasonable interval.
'''Facebook'''
<pre>
https://api.facebook.com/method/links.getStats?urls=http://www.mozilla.org&format=json
</pre>
'''Twitter'''
<pre>
http://urls.api.twitter.com/1/urls/count.json?url=www.mozilla.org
</pre>
'''G+'''
Google does not appear to allow access to the raw share count, and AFAIK there is no public API for this methind. A possible workaround is to call the following url and extract the number.
<pre>
https://plusone.google.com/_/+1/fastbutton?url=http://www.mozilla.org
</pre>
This is particularly problematic because the number returned could be a string (1.6k) and will need to be normalized.


== Commenting ==
== Commenting ==
canmove, Confirmed users
2,745

edits

Navigation menu