{"action":"created","comment":{"url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/comments/71068745","id":71068745,"diff_hunk":"@@ -0,0 +1,72 @@\n+//\n+//  ShareViewController.swift\n+//  Select_Flick_Week2\n+//\n+//  Created by admin on 7/13/16.\n+//  Copyright © 2016 koyot3. All rights reserved.\n+//\n+\n+import UIKit\n+import Social\n+\n+class ShareViewController: UIViewController {\n+\n+    @IBOutlet weak var statusField: UITextView!\n+    override func viewDidLoad() {\n+        super.viewDidLoad()\n+        let shareBtn = UIBarButtonItem(title: \"Share\", style: UIBarButtonItemStyle.Plain, target: self, action: #selector(addTapped))\n+        self.navigationItem.setRightBarButtonItem(shareBtn, animated: true)\n+    }\n+    func addTapped(sender:AnyObject){\n+        if statusField.text != \"\" {\n+            let actionSheet = UIAlertController(title: \"\", message: \"Share your Note\", preferredStyle: UIAlertControllerStyle.ActionSheet)\n+            // Configure a new action for sharing the note in Twitter.\n+            let tweetAction = UIAlertAction(title: \"Share on Twitter\", style: UIAlertActionStyle.Default) { (action) -> Void in  \n+                    // Check if sharing to Twitter is possible.\n+                    if SLComposeViewController.isAvailableForServiceType(SLServiceTypeTwitter) {\n+                        let twitterComposeVC = SLComposeViewController(forServiceType: SLServiceTypeTwitter)\n+                        \n+                        twitterComposeVC.setInitialText(\"\\(self.statusField.text)\")\n+                        \n+                        self.presentViewController(twitterComposeVC, animated: true, completion: nil)\n+                    }\n+                    else {\n+                        self.showAlertMessage(\"You are not logged in to your Twitter account.\")\n+                    }\n+                \n+            }\n+            \n+            \n+            // Configure a new action to share on Facebook.\n+            let facebookPostAction = UIAlertAction(title: \"Share on Facebook\", style: UIAlertActionStyle.Default) { (action) -> Void in\n+                        if SLComposeViewController.isAvailableForServiceType(SLServiceTypeFacebook) {\n+                            let facebookComposeVC = SLComposeViewController(forServiceType: SLServiceTypeFacebook)\n+                            \n+                            facebookComposeVC.setInitialText(\"\\(self.statusField.text)\")\n+                            \n+                            self.presentViewController(facebookComposeVC, animated: true, completion: nil)\n+                        }\n+                        else {\n+                            self.showAlertMessage(\"You are not connected to your Facebook account.\")\n+                        }\n+                }\n+            \n+            let dismissAction = UIAlertAction(title: \"Close\", style: UIAlertActionStyle.Cancel) { (action) -> Void in\n+                \n+            }\n+            \n+            ","path":"Select_Flick_Week2/ShareViewController.swift","position":58,"original_position":58,"commit_id":"9f20dc4758443f33eae572518493ed241e025798","original_commit_id":"9f20dc4758443f33eae572518493ed241e025798","user":{"login":"chug2k","id":44512,"avatar_url":"https://avatars.githubusercontent.com/u/44512?v=3","gravatar_id":"","url":"https://api.github.com/users/chug2k","html_url":"https://github.com/chug2k","followers_url":"https://api.github.com/users/chug2k/followers","following_url":"https://api.github.com/users/chug2k/following{/other_user}","gists_url":"https://api.github.com/users/chug2k/gists{/gist_id}","starred_url":"https://api.github.com/users/chug2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chug2k/subscriptions","organizations_url":"https://api.github.com/users/chug2k/orgs","repos_url":"https://api.github.com/users/chug2k/repos","events_url":"https://api.github.com/users/chug2k/events{/privacy}","received_events_url":"https://api.github.com/users/chug2k/received_events","type":"User","site_admin":false},"body":"one blank line max","created_at":"2016-07-16T16:49:22Z","updated_at":"2016-07-16T16:49:22Z","html_url":"https://github.com/koyot3/Select-Flick-Week2/pull/2#discussion_r71068745","pull_request_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/comments/71068745"},"html":{"href":"https://github.com/koyot3/Select-Flick-Week2/pull/2#discussion_r71068745"},"pull_request":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/2","id":77713021,"html_url":"https://github.com/koyot3/Select-Flick-Week2/pull/2","diff_url":"https://github.com/koyot3/Select-Flick-Week2/pull/2.diff","patch_url":"https://github.com/koyot3/Select-Flick-Week2/pull/2.patch","issue_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues/2","number":2,"state":"open","locked":false,"title":"Pull request 2: Favoriting and Sharing","user":{"login":"koyot3","id":6136341,"avatar_url":"https://avatars.githubusercontent.com/u/6136341?v=3","gravatar_id":"","url":"https://api.github.com/users/koyot3","html_url":"https://github.com/koyot3","followers_url":"https://api.github.com/users/koyot3/followers","following_url":"https://api.github.com/users/koyot3/following{/other_user}","gists_url":"https://api.github.com/users/koyot3/gists{/gist_id}","starred_url":"https://api.github.com/users/koyot3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koyot3/subscriptions","organizations_url":"https://api.github.com/users/koyot3/orgs","repos_url":"https://api.github.com/users/koyot3/repos","events_url":"https://api.github.com/users/koyot3/events{/privacy}","received_events_url":"https://api.github.com/users/koyot3/received_events","type":"User","site_admin":false},"body":"Hi @chug2k, \r\nPlease help me to review Pull request 2! ","created_at":"2016-07-16T16:09:51Z","updated_at":"2016-07-16T16:49:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/2/commits","review_comments_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/2/comments","review_comment_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues/2/comments","statuses_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/statuses/9f20dc4758443f33eae572518493ed241e025798","head":{"label":"koyot3:PullRequest2","ref":"PullRequest2","sha":"9f20dc4758443f33eae572518493ed241e025798","user":{"login":"koyot3","id":6136341,"avatar_url":"https://avatars.githubusercontent.com/u/6136341?v=3","gravatar_id":"","url":"https://api.github.com/users/koyot3","html_url":"https://github.com/koyot3","followers_url":"https://api.github.com/users/koyot3/followers","following_url":"https://api.github.com/users/koyot3/following{/other_user}","gists_url":"https://api.github.com/users/koyot3/gists{/gist_id}","starred_url":"https://api.github.com/users/koyot3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koyot3/subscriptions","organizations_url":"https://api.github.com/users/koyot3/orgs","repos_url":"https://api.github.com/users/koyot3/repos","events_url":"https://api.github.com/users/koyot3/events{/privacy}","received_events_url":"https://api.github.com/users/koyot3/received_events","type":"User","site_admin":false},"repo":{"id":62320989,"name":"Select-Flick-Week2","full_name":"koyot3/Select-Flick-Week2","owner":{"login":"koyot3","id":6136341,"avatar_url":"https://avatars.githubusercontent.com/u/6136341?v=3","gravatar_id":"","url":"https://api.github.com/users/koyot3","html_url":"https://github.com/koyot3","followers_url":"https://api.github.com/users/koyot3/followers","following_url":"https://api.github.com/users/koyot3/following{/other_user}","gists_url":"https://api.github.com/users/koyot3/gists{/gist_id}","starred_url":"https://api.github.com/users/koyot3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koyot3/subscriptions","organizations_url":"https://api.github.com/users/koyot3/orgs","repos_url":"https://api.github.com/users/koyot3/repos","events_url":"https://api.github.com/users/koyot3/events{/privacy}","received_events_url":"https://api.github.com/users/koyot3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/koyot3/Select-Flick-Week2","description":null,"fork":false,"url":"https://api.github.com/repos/koyot3/Select-Flick-Week2","forks_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/forks","keys_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/teams","hooks_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/hooks","issue_events_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues/events{/number}","events_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/events","assignees_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/assignees{/user}","branches_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/branches{/branch}","tags_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/tags","blobs_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/refs{/sha}","trees_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/statuses/{sha}","languages_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/languages","stargazers_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/stargazers","contributors_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/contributors","subscribers_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/subscribers","subscription_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/subscription","commits_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/commits{/sha}","git_commits_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/commits{/sha}","comments_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/comments{/number}","issue_comment_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues/comments{/number}","contents_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/contents/{+path}","compare_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/merges","archive_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/downloads","issues_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues{/number}","pulls_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls{/number}","milestones_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/milestones{/number}","notifications_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/labels{/name}","releases_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/releases{/id}","deployments_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/deployments","created_at":"2016-06-30T15:17:39Z","updated_at":"2016-07-03T14:51:59Z","pushed_at":"2016-07-16T16:12:14Z","git_url":"git://github.com/koyot3/Select-Flick-Week2.git","ssh_url":"git@github.com:koyot3/Select-Flick-Week2.git","clone_url":"https://github.com/koyot3/Select-Flick-Week2.git","svn_url":"https://github.com/koyot3/Select-Flick-Week2","homepage":null,"size":5300,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"koyot3:master","ref":"master","sha":"45dcde2bb0d77ce8d07138656f8b161a88baa8ab","user":{"login":"koyot3","id":6136341,"avatar_url":"https://avatars.githubusercontent.com/u/6136341?v=3","gravatar_id":"","url":"https://api.github.com/users/koyot3","html_url":"https://github.com/koyot3","followers_url":"https://api.github.com/users/koyot3/followers","following_url":"https://api.github.com/users/koyot3/following{/other_user}","gists_url":"https://api.github.com/users/koyot3/gists{/gist_id}","starred_url":"https://api.github.com/users/koyot3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koyot3/subscriptions","organizations_url":"https://api.github.com/users/koyot3/orgs","repos_url":"https://api.github.com/users/koyot3/repos","events_url":"https://api.github.com/users/koyot3/events{/privacy}","received_events_url":"https://api.github.com/users/koyot3/received_events","type":"User","site_admin":false},"repo":{"id":62320989,"name":"Select-Flick-Week2","full_name":"koyot3/Select-Flick-Week2","owner":{"login":"koyot3","id":6136341,"avatar_url":"https://avatars.githubusercontent.com/u/6136341?v=3","gravatar_id":"","url":"https://api.github.com/users/koyot3","html_url":"https://github.com/koyot3","followers_url":"https://api.github.com/users/koyot3/followers","following_url":"https://api.github.com/users/koyot3/following{/other_user}","gists_url":"https://api.github.com/users/koyot3/gists{/gist_id}","starred_url":"https://api.github.com/users/koyot3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koyot3/subscriptions","organizations_url":"https://api.github.com/users/koyot3/orgs","repos_url":"https://api.github.com/users/koyot3/repos","events_url":"https://api.github.com/users/koyot3/events{/privacy}","received_events_url":"https://api.github.com/users/koyot3/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/koyot3/Select-Flick-Week2","description":null,"fork":false,"url":"https://api.github.com/repos/koyot3/Select-Flick-Week2","forks_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/forks","keys_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/teams","hooks_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/hooks","issue_events_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues/events{/number}","events_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/events","assignees_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/assignees{/user}","branches_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/branches{/branch}","tags_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/tags","blobs_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/refs{/sha}","trees_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/statuses/{sha}","languages_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/languages","stargazers_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/stargazers","contributors_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/contributors","subscribers_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/subscribers","subscription_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/subscription","commits_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/commits{/sha}","git_commits_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/git/commits{/sha}","comments_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/comments{/number}","issue_comment_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues/comments{/number}","contents_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/contents/{+path}","compare_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/merges","archive_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/downloads","issues_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues{/number}","pulls_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls{/number}","milestones_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/milestones{/number}","notifications_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/labels{/name}","releases_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/releases{/id}","deployments_url":"https://api.github.com/repos/koyot3/Select-Flick-Week2/deployments","created_at":"2016-06-30T15:17:39Z","updated_at":"2016-07-03T14:51:59Z","pushed_at":"2016-07-16T16:12:14Z","git_url":"git://github.com/koyot3/Select-Flick-Week2.git","ssh_url":"git@github.com:koyot3/Select-Flick-Week2.git","clone_url":"https://github.com/koyot3/Select-Flick-Week2.git","svn_url":"https://github.com/koyot3/Select-Flick-Week2","homepage":null,"size":5300,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/2"},"html":{"href":"https://github.com/koyot3/Select-Flick-Week2/pull/2"},"issue":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues/2"},"comments":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/koyot3/Select-Flick-Week2/statuses/9f20dc4758443f33eae572518493ed241e025798"}}}}
{"actor":{"display_login":"chug2k"}}