{"action":"created","comment":{"url":"https://api.github.com/repos/google/WebFundamentals/pulls/comments/84114300","pull_request_review_id":4912415,"id":84114300,"diff_hunk":"@@ -0,0 +1,126 @@\n+project_path: /web/_project.yaml\n+book_path: /web/updates/_book.yaml\n+description: Sharing is caring. Chrome is running an Origin Trial to enable\n+             native sharing on the web.\n+\n+{# wf_published_on: 2016-10-19 #}\n+{# wf_updated_on: 2016-10-19 #}\n+\n+Good news, everybody! [Matt Giuca](https://twitter.com/mgiuca) on the Chrome\n+team has been working on a [simple\n+API](https://github.com/WICG/web-share/blob/master/docs/interface.md) called\n+[Web Share](https://github.com/WICG/web-share/blob/master/docs/explainer.md)\n+that allows websites to invoke the native sharing capabilities of the host\n+platform.\n+\n+There have been a number of ways to invoke native sharing capabilities on the\n+platform, but they all have significant drawbacks.  There was [Web\n+Intents](https://en.wikipedia.org/wiki/Paul_Kinlan) (dead), there is protocol\n+handling (poor support on mobile), there is direct sharing to a well-known\n+service URL such as Twitter's, and there is also the [Android intent: URL\n+syntax](https://paul.kinlan.me/sharing-natively-on-android-from-the-web/) (well,\n+Android-only, and Apps had to opt-in).\n+\n+The Web Share API is important because it gives the user control of how and\n+where the data is shared.\n+\n+In Chrome 55 (Beta as of October 2016), we've enabled an [Origin\n+Trial](https://github.com/jpchase/OriginTrials/blob/gh-pages/developer-guide.md)\n+that lets you integrate the Web Share API into your site. The origin trial means\n+this API is not generally available to all sites; instead you need to register\n+to get access during this Trial phase. Over this time, the API will likely\n+change and break in unexpected ways and we are looking for as much feedback as\n+possible.\n+\n+The Web Share API is\n+[promise](https://developers.google.com/web/fundamentals/getting-started/primers/promises)-based\n+single method API that takes an object with properties title, text and url.\n+\n+    navigator.share({\n+        title: document.title,\n+        text: window.location.href,\n+        url: window.location.href\n+    }).then(() => console.log('Successful share'))\n+    .catch(() => console.log('Error sharing:', error));\n+\n+Once invoked it will bring up the native picker (see video) and allow you to\n+share the data with the app that the user prefers.\n+\n+<div class=\"video-wrapper\">\n+  <iframe class=\"devsite-embedded-youtube-video\" data-video-id=\"lhUzYxCvWew\"\n+          data-autohide=\"1\" data-showinfo=\"0\" frameborder=\"0\" allowfullscreen>\n+  </iframe>\n+</div>\n+\n+There are a number of constraints that affect the usage of this API\n+\n+* You need to host your site in a [secure\n+  context](https://www.chromium.org/Home/chromium-security/prefer-secure-origins-for-powerful-new-features)\n+  (typically https)\n+* You can only invoke the API as a result of a user gesture (i.e, you can't call\n+  navigator.share() in an onload handler)","path":"src/content/en/updates/2016/10/navigator.share.md","position":null,"original_position":61,"commit_id":"a29fedf357a6acd7e441a850f6e258d36a4ab0dd","original_commit_id":"d170cf749262bd722cdf87047b7aea2d532126cc","user":{"login":"PaulKinlan","id":45510,"avatar_url":"https://avatars.githubusercontent.com/u/45510?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulKinlan","html_url":"https://github.com/PaulKinlan","followers_url":"https://api.github.com/users/PaulKinlan/followers","following_url":"https://api.github.com/users/PaulKinlan/following{/other_user}","gists_url":"https://api.github.com/users/PaulKinlan/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulKinlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulKinlan/subscriptions","organizations_url":"https://api.github.com/users/PaulKinlan/orgs","repos_url":"https://api.github.com/users/PaulKinlan/repos","events_url":"https://api.github.com/users/PaulKinlan/events{/privacy}","received_events_url":"https://api.github.com/users/PaulKinlan/received_events","type":"User","site_admin":false},"body":"yep, fixed the other ones too.","created_at":"2016-10-19T16:44:38Z","updated_at":"2016-10-19T16:44:38Z","html_url":"https://github.com/google/WebFundamentals/pull/3719#discussion_r84114300","pull_request_url":"https://api.github.com/repos/google/WebFundamentals/pulls/3719","_links":{"self":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/comments/84114300"},"html":{"href":"https://github.com/google/WebFundamentals/pull/3719#discussion_r84114300"},"pull_request":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/3719"}}},"pull_request":{"url":"https://api.github.com/repos/google/WebFundamentals/pulls/3719","id":90035205,"html_url":"https://github.com/google/WebFundamentals/pull/3719","diff_url":"https://github.com/google/WebFundamentals/pull/3719.diff","patch_url":"https://github.com/google/WebFundamentals/pull/3719.patch","issue_url":"https://api.github.com/repos/google/WebFundamentals/issues/3719","number":3719,"state":"open","locked":false,"title":"Navigator.Share post","user":{"login":"PaulKinlan","id":45510,"avatar_url":"https://avatars.githubusercontent.com/u/45510?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulKinlan","html_url":"https://github.com/PaulKinlan","followers_url":"https://api.github.com/users/PaulKinlan/followers","following_url":"https://api.github.com/users/PaulKinlan/following{/other_user}","gists_url":"https://api.github.com/users/PaulKinlan/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulKinlan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulKinlan/subscriptions","organizations_url":"https://api.github.com/users/PaulKinlan/orgs","repos_url":"https://api.github.com/users/PaulKinlan/repos","events_url":"https://api.github.com/users/PaulKinlan/events{/privacy}","received_events_url":"https://api.github.com/users/PaulKinlan/received_events","type":"User","site_admin":false},"body":"This is the post to support the Origin Trial of `navigator.share`","created_at":"2016-10-19T15:37:12Z","updated_at":"2016-10-19T16:44:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1192e1888f6c2fb77c0e8eace7ba4964d898fdf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/google/WebFundamentals/pulls/3719/commits","review_comments_url":"https://api.github.com/repos/google/WebFundamentals/pulls/3719/comments","review_comment_url":"https://api.github.com/repos/google/WebFundamentals/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/WebFundamentals/issues/3719/comments","statuses_url":"https://api.github.com/repos/google/WebFundamentals/statuses/a29fedf357a6acd7e441a850f6e258d36a4ab0dd","head":{"label":"google:sharing","ref":"sharing","sha":"a29fedf357a6acd7e441a850f6e258d36a4ab0dd","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":19249835,"name":"WebFundamentals","full_name":"google/WebFundamentals","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/WebFundamentals","description":"Best practices for modern web development","fork":false,"url":"https://api.github.com/repos/google/WebFundamentals","forks_url":"https://api.github.com/repos/google/WebFundamentals/forks","keys_url":"https://api.github.com/repos/google/WebFundamentals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/WebFundamentals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/WebFundamentals/teams","hooks_url":"https://api.github.com/repos/google/WebFundamentals/hooks","issue_events_url":"https://api.github.com/repos/google/WebFundamentals/issues/events{/number}","events_url":"https://api.github.com/repos/google/WebFundamentals/events","assignees_url":"https://api.github.com/repos/google/WebFundamentals/assignees{/user}","branches_url":"https://api.github.com/repos/google/WebFundamentals/branches{/branch}","tags_url":"https://api.github.com/repos/google/WebFundamentals/tags","blobs_url":"https://api.github.com/repos/google/WebFundamentals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/WebFundamentals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/WebFundamentals/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/WebFundamentals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/WebFundamentals/statuses/{sha}","languages_url":"https://api.github.com/repos/google/WebFundamentals/languages","stargazers_url":"https://api.github.com/repos/google/WebFundamentals/stargazers","contributors_url":"https://api.github.com/repos/google/WebFundamentals/contributors","subscribers_url":"https://api.github.com/repos/google/WebFundamentals/subscribers","subscription_url":"https://api.github.com/repos/google/WebFundamentals/subscription","commits_url":"https://api.github.com/repos/google/WebFundamentals/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/WebFundamentals/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/WebFundamentals/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/WebFundamentals/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/WebFundamentals/contents/{+path}","compare_url":"https://api.github.com/repos/google/WebFundamentals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/WebFundamentals/merges","archive_url":"https://api.github.com/repos/google/WebFundamentals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/WebFundamentals/downloads","issues_url":"https://api.github.com/repos/google/WebFundamentals/issues{/number}","pulls_url":"https://api.github.com/repos/google/WebFundamentals/pulls{/number}","milestones_url":"https://api.github.com/repos/google/WebFundamentals/milestones{/number}","notifications_url":"https://api.github.com/repos/google/WebFundamentals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/WebFundamentals/labels{/name}","releases_url":"https://api.github.com/repos/google/WebFundamentals/releases{/id}","deployments_url":"https://api.github.com/repos/google/WebFundamentals/deployments","created_at":"2014-04-28T18:45:45Z","updated_at":"2016-10-19T13:53:53Z","pushed_at":"2016-10-19T16:44:27Z","git_url":"git://github.com/google/WebFundamentals.git","ssh_url":"git@github.com:google/WebFundamentals.git","clone_url":"https://github.com/google/WebFundamentals.git","svn_url":"https://github.com/google/WebFundamentals","homepage":"https://developers.google.com/web/fundamentals","size":1165427,"stargazers_count":6620,"watchers_count":6620,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1239,"mirror_url":null,"open_issues_count":102,"forks":1239,"open_issues":102,"watchers":6620,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"a4d7e460f4dfacfdd162a627e8c841c62663b9ab","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":19249835,"name":"WebFundamentals","full_name":"google/WebFundamentals","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/WebFundamentals","description":"Best practices for modern web development","fork":false,"url":"https://api.github.com/repos/google/WebFundamentals","forks_url":"https://api.github.com/repos/google/WebFundamentals/forks","keys_url":"https://api.github.com/repos/google/WebFundamentals/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/WebFundamentals/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/WebFundamentals/teams","hooks_url":"https://api.github.com/repos/google/WebFundamentals/hooks","issue_events_url":"https://api.github.com/repos/google/WebFundamentals/issues/events{/number}","events_url":"https://api.github.com/repos/google/WebFundamentals/events","assignees_url":"https://api.github.com/repos/google/WebFundamentals/assignees{/user}","branches_url":"https://api.github.com/repos/google/WebFundamentals/branches{/branch}","tags_url":"https://api.github.com/repos/google/WebFundamentals/tags","blobs_url":"https://api.github.com/repos/google/WebFundamentals/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/WebFundamentals/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/WebFundamentals/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/WebFundamentals/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/WebFundamentals/statuses/{sha}","languages_url":"https://api.github.com/repos/google/WebFundamentals/languages","stargazers_url":"https://api.github.com/repos/google/WebFundamentals/stargazers","contributors_url":"https://api.github.com/repos/google/WebFundamentals/contributors","subscribers_url":"https://api.github.com/repos/google/WebFundamentals/subscribers","subscription_url":"https://api.github.com/repos/google/WebFundamentals/subscription","commits_url":"https://api.github.com/repos/google/WebFundamentals/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/WebFundamentals/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/WebFundamentals/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/WebFundamentals/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/WebFundamentals/contents/{+path}","compare_url":"https://api.github.com/repos/google/WebFundamentals/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/WebFundamentals/merges","archive_url":"https://api.github.com/repos/google/WebFundamentals/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/WebFundamentals/downloads","issues_url":"https://api.github.com/repos/google/WebFundamentals/issues{/number}","pulls_url":"https://api.github.com/repos/google/WebFundamentals/pulls{/number}","milestones_url":"https://api.github.com/repos/google/WebFundamentals/milestones{/number}","notifications_url":"https://api.github.com/repos/google/WebFundamentals/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/WebFundamentals/labels{/name}","releases_url":"https://api.github.com/repos/google/WebFundamentals/releases{/id}","deployments_url":"https://api.github.com/repos/google/WebFundamentals/deployments","created_at":"2014-04-28T18:45:45Z","updated_at":"2016-10-19T13:53:53Z","pushed_at":"2016-10-19T16:44:27Z","git_url":"git://github.com/google/WebFundamentals.git","ssh_url":"git@github.com:google/WebFundamentals.git","clone_url":"https://github.com/google/WebFundamentals.git","svn_url":"https://github.com/google/WebFundamentals","homepage":"https://developers.google.com/web/fundamentals","size":1165427,"stargazers_count":6620,"watchers_count":6620,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1239,"mirror_url":null,"open_issues_count":102,"forks":1239,"open_issues":102,"watchers":6620,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/3719"},"html":{"href":"https://github.com/google/WebFundamentals/pull/3719"},"issue":{"href":"https://api.github.com/repos/google/WebFundamentals/issues/3719"},"comments":{"href":"https://api.github.com/repos/google/WebFundamentals/issues/3719/comments"},"review_comments":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/3719/comments"},"review_comment":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/WebFundamentals/pulls/3719/commits"},"statuses":{"href":"https://api.github.com/repos/google/WebFundamentals/statuses/a29fedf357a6acd7e441a850f6e258d36a4ab0dd"}}}}
{"actor":{"display_login":"PaulKinlan"}}