Social Sharing
Contents
Overview
We need to find a way to utilize the sharing features of Twiiter, Facebook and other social media services while following our security best practices and our privacy policy.
See bug 701759 for more information.
Who's on the Team?
How do I get involved?
Meetings
Requirements
Both Twitter and Facebook require that JavaScript libraries be included from their servers in order to use their social sharing widgets.
We need a way to include those widgets only *after* a user has indicated they should be loaded.
There should be a social sharing button or link on the page. When the user clicks on it, the Twitter and Facebook libraries should be included and the appropriate widgets included.
The solution should be designed in such a way as to be re-usable across many projects. It's possible we will need to design a few different solutions to accommodate a few common usage scenarios.
The resulting widgets will not have a fixed size, so any solution needs to take this variability in to account.
The widgets must be available in a localized version for pages that are localized.
Multiple social networks should be supported and both each page and locale should be able to specify the social networks that appear in the sharing widgets. The preliminary social networks to support are Facebook, Twitter, and Google+.
Aggregate metrics should be available for each page or site that uses the social sharing widgets. The number of shares is the key metric and number of clicks on a share button is also desirable, but not required.
Usage scenarios
- Simple sharing widgets (no share counters)
- A sharing widget for specified social networks is shown with no information about the number of shares displayed to the user.
- Sharing widgets with share counters
- A sharing widget for specified social networks is shown with the number of shares displayed to the user. This number may be rounded or abbreviated for design purposes. Example share counts: 0, 5, 93, 152, 1K, 8K, 34K, 391K, 1M, 3M.
- Sharing for specific locale
- The Spanish version of a page choose to use different social networks in their sharing widget than the networks selected for the en-US page.
Implementation options
These approaches have been considered in bug 701759:
- Option 1: Proxy Facebook/Twitter/Google+ numbers and just display them on our website without leaking user data
- Option 2: Displayed greyed out Facebook/Twitter/Google+ buttons that activate on click
- Option 3: Hide widgets completely until user clicks generic share button and display stock widgets
Option 1 & 2 have been determined to violate FB and/or Twitter's terms of service. Option 3 is the most viable approach and the one that we will implement. The proof of concenpt below demonstrates this option.