Skip to content

Instantly share code, notes, and snippets.

@GDmac
Last active August 29, 2015 13:57
Show Gist options
  • Save GDmac/9396854 to your computer and use it in GitHub Desktop.
Save GDmac/9396854 to your computer and use it in GitHub Desktop.
Mobile sharing buttons (app or website)

Sharing on the mobile platform

Many smartphone users (probably most) use dedicated apps for their social sharing. However, when clicking on a share button on websites, the user is redirected to the website instead of to the app for twitter and facebook. This document tries to offer an alternative route for sharing on mobile.

User story and technique

  1. When a user clicks the share button for the first time
    ask if he/she wants to use an app or to go to the website.
    Use local storage (jstorage) or cookies to store user preferences.
  2. When the user wants to use the app, use a small script to verify
    that the app is installed. When not, offer the option to still go
    to the website. (save preferences accordingly).
    example script: How to check if a url-scheme is supported (makebetterthings.com)
  3. When a user wants to share another page, no option has to be offered
    as the previous setting can be used. For this to work, the solution needs to be:
    • offered in an iframe/jsonp, so it can use it's own local-storage/cookies (domain-specific)
    • offered on a large enough centralised platform (addthis.com) so that the users don't need
      to set preferences for multiple website.
  4. An extra button leads to the (offcanvas) settings page to alter settings.
  5. Some url-schemes:
    twitter: twitter://post?message=hello%20world
    facebook: fb://post/... (unsure)
    important reads: http://fokkezb.nl/2013/09/20/url-schemes-for-ios-and-android-2/
  6. Offer an option for power-users to set their own url-scheme.
    This way a power-user can select the app to use. (e.g. twitterrific://)

GDmac 2014-03-06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment