{"action":"created","comment":{"url":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/comments/82921427","pull_request_review_id":3794622,"id":82921427,"diff_hunk":"@@ -0,0 +1,126 @@\n+package pizza.olin.consamables;\n+\n+import android.os.Bundle;\n+import android.support.annotation.NonNull;\n+import android.support.v7.app.AppCompatActivity;\n+import android.util.Log;\n+import android.widget.Toast;\n+\n+import com.facebook.AccessToken;\n+import com.facebook.CallbackManager;\n+import com.facebook.FacebookCallback;\n+import com.facebook.FacebookException;\n+import com.facebook.FacebookSdk;\n+import com.facebook.login.LoginResult;\n+import com.facebook.login.widget.LoginButton;\n+import com.google.android.gms.tasks.OnCompleteListener;\n+import com.google.android.gms.tasks.Task;\n+import com.google.firebase.auth.AuthCredential;\n+import com.google.firebase.auth.AuthResult;\n+import com.google.firebase.auth.FacebookAuthProvider;\n+import com.google.firebase.auth.FirebaseAuth;\n+import com.google.firebase.auth.FirebaseUser;\n+\n+public class LoginActivity extends AppCompatActivity {\n+\n+    private static final String TAG = \"LoginActivity\";\n+    private CallbackManager callbackManager;\n+    private FirebaseAuth mAuth;\n+    private FirebaseAuth.AuthStateListener mAuthListener;\n+\n+    @Override\n+    protected void onCreate(Bundle savedInstanceState) {\n+        super.onCreate(savedInstanceState);\n+\n+        // has to happen before login button can be initialized\n+        FacebookSdk.sdkInitialize(getApplicationContext());\n+\n+        setContentView(R.layout.activity_login);\n+\n+        mAuth = FirebaseAuth.getInstance();\n+\n+        mAuthListener = new FirebaseAuth.AuthStateListener() {\n+            @Override\n+            public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n+                FirebaseUser user = firebaseAuth.getCurrentUser();\n+                if (user != null) {\n+                    // User is signed in\n+                    Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n+                } else {\n+                    // User is signed out\n+                    Log.d(TAG, \"onAuthStateChanged:signed_out\");\n+                }\n+                // ...\n+            }\n+        };\n+\n+\n+        callbackManager = CallbackManager.Factory.create();\n+\n+\n+        LoginButton loginButton = (LoginButton) findViewById(R.id.login_button);\n+        loginButton.setReadPermissions(\"email\", \"public_profile\");\n+        // Other app specific specialization\n+\n+        // Callback registration\n+        loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {\n+            @Override\n+            public void onSuccess(LoginResult loginResult) {\n+                // App code","path":"app/src/main/java/pizza/olin/consamables/LoginActivity.java","position":69,"original_position":69,"commit_id":"40fc092502d271b8c1faf242e0e39c9048c1ce81","original_commit_id":"40fc092502d271b8c1faf242e0e39c9048c1ce81","user":{"login":"sammyers","id":15810665,"avatar_url":"https://avatars.githubusercontent.com/u/15810665?v=3","gravatar_id":"","url":"https://api.github.com/users/sammyers","html_url":"https://github.com/sammyers","followers_url":"https://api.github.com/users/sammyers/followers","following_url":"https://api.github.com/users/sammyers/following{/other_user}","gists_url":"https://api.github.com/users/sammyers/gists{/gist_id}","starred_url":"https://api.github.com/users/sammyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sammyers/subscriptions","organizations_url":"https://api.github.com/users/sammyers/orgs","repos_url":"https://api.github.com/users/sammyers/repos","events_url":"https://api.github.com/users/sammyers/events{/privacy}","received_events_url":"https://api.github.com/users/sammyers/received_events","type":"User","site_admin":false},"body":"Would be good to know what you plan to do here.","created_at":"2016-10-12T01:17:14Z","updated_at":"2016-10-12T01:22:08Z","html_url":"https://github.com/Consamables/AndroidPizza/pull/5#discussion_r82921427","pull_request_url":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/comments/82921427"},"html":{"href":"https://github.com/Consamables/AndroidPizza/pull/5#discussion_r82921427"},"pull_request":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/5","id":88930259,"html_url":"https://github.com/Consamables/AndroidPizza/pull/5","diff_url":"https://github.com/Consamables/AndroidPizza/pull/5.diff","patch_url":"https://github.com/Consamables/AndroidPizza/pull/5.patch","issue_url":"https://api.github.com/repos/Consamables/AndroidPizza/issues/5","number":5,"state":"open","locked":false,"title":"Add Facebook login","user":{"login":"wolfd","id":930169,"avatar_url":"https://avatars.githubusercontent.com/u/930169?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfd","html_url":"https://github.com/wolfd","followers_url":"https://api.github.com/users/wolfd/followers","following_url":"https://api.github.com/users/wolfd/following{/other_user}","gists_url":"https://api.github.com/users/wolfd/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfd/subscriptions","organizations_url":"https://api.github.com/users/wolfd/orgs","repos_url":"https://api.github.com/users/wolfd/repos","events_url":"https://api.github.com/users/wolfd/events{/privacy}","received_events_url":"https://api.github.com/users/wolfd/received_events","type":"User","site_admin":false},"body":"Adds Facebook login button and integrates it with Firebase","created_at":"2016-10-11T23:38:04Z","updated_at":"2016-10-12T01:22:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2f9978aea64703c0993a0cd3c30dbfe9afa8687d","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Consamables/AndroidPizza/milestones/1","html_url":"https://github.com/Consamables/AndroidPizza/milestones/First%20check-in","labels_url":"https://api.github.com/repos/Consamables/AndroidPizza/milestones/1/labels","id":2045575,"number":1,"title":"First check-in","description":"","creator":{"login":"wolfd","id":930169,"avatar_url":"https://avatars.githubusercontent.com/u/930169?v=3","gravatar_id":"","url":"https://api.github.com/users/wolfd","html_url":"https://github.com/wolfd","followers_url":"https://api.github.com/users/wolfd/followers","following_url":"https://api.github.com/users/wolfd/following{/other_user}","gists_url":"https://api.github.com/users/wolfd/gists{/gist_id}","starred_url":"https://api.github.com/users/wolfd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wolfd/subscriptions","organizations_url":"https://api.github.com/users/wolfd/orgs","repos_url":"https://api.github.com/users/wolfd/repos","events_url":"https://api.github.com/users/wolfd/events{/privacy}","received_events_url":"https://api.github.com/users/wolfd/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2016-10-03T23:50:18Z","updated_at":"2016-10-11T23:38:04Z","due_on":"2016-10-10T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Consamables/AndroidPizza/issues/5/comments","statuses_url":"https://api.github.com/repos/Consamables/AndroidPizza/statuses/40fc092502d271b8c1faf242e0e39c9048c1ce81","head":{"label":"Consamables:auth","ref":"auth","sha":"40fc092502d271b8c1faf242e0e39c9048c1ce81","user":{"login":"Consamables","id":22604717,"avatar_url":"https://avatars.githubusercontent.com/u/22604717?v=3","gravatar_id":"","url":"https://api.github.com/users/Consamables","html_url":"https://github.com/Consamables","followers_url":"https://api.github.com/users/Consamables/followers","following_url":"https://api.github.com/users/Consamables/following{/other_user}","gists_url":"https://api.github.com/users/Consamables/gists{/gist_id}","starred_url":"https://api.github.com/users/Consamables/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Consamables/subscriptions","organizations_url":"https://api.github.com/users/Consamables/orgs","repos_url":"https://api.github.com/users/Consamables/repos","events_url":"https://api.github.com/users/Consamables/events{/privacy}","received_events_url":"https://api.github.com/users/Consamables/received_events","type":"Organization","site_admin":false},"repo":{"id":69919298,"name":"AndroidPizza","full_name":"Consamables/AndroidPizza","owner":{"login":"Consamables","id":22604717,"avatar_url":"https://avatars.githubusercontent.com/u/22604717?v=3","gravatar_id":"","url":"https://api.github.com/users/Consamables","html_url":"https://github.com/Consamables","followers_url":"https://api.github.com/users/Consamables/followers","following_url":"https://api.github.com/users/Consamables/following{/other_user}","gists_url":"https://api.github.com/users/Consamables/gists{/gist_id}","starred_url":"https://api.github.com/users/Consamables/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Consamables/subscriptions","organizations_url":"https://api.github.com/users/Consamables/orgs","repos_url":"https://api.github.com/users/Consamables/repos","events_url":"https://api.github.com/users/Consamables/events{/privacy}","received_events_url":"https://api.github.com/users/Consamables/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Consamables/AndroidPizza","description":"Olin's #1 Pizza Ordering App for Android 4.1 and Above","fork":false,"url":"https://api.github.com/repos/Consamables/AndroidPizza","forks_url":"https://api.github.com/repos/Consamables/AndroidPizza/forks","keys_url":"https://api.github.com/repos/Consamables/AndroidPizza/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Consamables/AndroidPizza/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Consamables/AndroidPizza/teams","hooks_url":"https://api.github.com/repos/Consamables/AndroidPizza/hooks","issue_events_url":"https://api.github.com/repos/Consamables/AndroidPizza/issues/events{/number}","events_url":"https://api.github.com/repos/Consamables/AndroidPizza/events","assignees_url":"https://api.github.com/repos/Consamables/AndroidPizza/assignees{/user}","branches_url":"https://api.github.com/repos/Consamables/AndroidPizza/branches{/branch}","tags_url":"https://api.github.com/repos/Consamables/AndroidPizza/tags","blobs_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/refs{/sha}","trees_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Consamables/AndroidPizza/statuses/{sha}","languages_url":"https://api.github.com/repos/Consamables/AndroidPizza/languages","stargazers_url":"https://api.github.com/repos/Consamables/AndroidPizza/stargazers","contributors_url":"https://api.github.com/repos/Consamables/AndroidPizza/contributors","subscribers_url":"https://api.github.com/repos/Consamables/AndroidPizza/subscribers","subscription_url":"https://api.github.com/repos/Consamables/AndroidPizza/subscription","commits_url":"https://api.github.com/repos/Consamables/AndroidPizza/commits{/sha}","git_commits_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/commits{/sha}","comments_url":"https://api.github.com/repos/Consamables/AndroidPizza/comments{/number}","issue_comment_url":"https://api.github.com/repos/Consamables/AndroidPizza/issues/comments{/number}","contents_url":"https://api.github.com/repos/Consamables/AndroidPizza/contents/{+path}","compare_url":"https://api.github.com/repos/Consamables/AndroidPizza/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Consamables/AndroidPizza/merges","archive_url":"https://api.github.com/repos/Consamables/AndroidPizza/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Consamables/AndroidPizza/downloads","issues_url":"https://api.github.com/repos/Consamables/AndroidPizza/issues{/number}","pulls_url":"https://api.github.com/repos/Consamables/AndroidPizza/pulls{/number}","milestones_url":"https://api.github.com/repos/Consamables/AndroidPizza/milestones{/number}","notifications_url":"https://api.github.com/repos/Consamables/AndroidPizza/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Consamables/AndroidPizza/labels{/name}","releases_url":"https://api.github.com/repos/Consamables/AndroidPizza/releases{/id}","deployments_url":"https://api.github.com/repos/Consamables/AndroidPizza/deployments","created_at":"2016-10-03T23:26:02Z","updated_at":"2016-10-06T22:43:43Z","pushed_at":"2016-10-11T23:42:17Z","git_url":"git://github.com/Consamables/AndroidPizza.git","ssh_url":"git@github.com:Consamables/AndroidPizza.git","clone_url":"https://github.com/Consamables/AndroidPizza.git","svn_url":"https://github.com/Consamables/AndroidPizza","homepage":null,"size":191,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"Consamables:master","ref":"master","sha":"5c164a9f7f7a6784f4701baea6787e1e74540b66","user":{"login":"Consamables","id":22604717,"avatar_url":"https://avatars.githubusercontent.com/u/22604717?v=3","gravatar_id":"","url":"https://api.github.com/users/Consamables","html_url":"https://github.com/Consamables","followers_url":"https://api.github.com/users/Consamables/followers","following_url":"https://api.github.com/users/Consamables/following{/other_user}","gists_url":"https://api.github.com/users/Consamables/gists{/gist_id}","starred_url":"https://api.github.com/users/Consamables/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Consamables/subscriptions","organizations_url":"https://api.github.com/users/Consamables/orgs","repos_url":"https://api.github.com/users/Consamables/repos","events_url":"https://api.github.com/users/Consamables/events{/privacy}","received_events_url":"https://api.github.com/users/Consamables/received_events","type":"Organization","site_admin":false},"repo":{"id":69919298,"name":"AndroidPizza","full_name":"Consamables/AndroidPizza","owner":{"login":"Consamables","id":22604717,"avatar_url":"https://avatars.githubusercontent.com/u/22604717?v=3","gravatar_id":"","url":"https://api.github.com/users/Consamables","html_url":"https://github.com/Consamables","followers_url":"https://api.github.com/users/Consamables/followers","following_url":"https://api.github.com/users/Consamables/following{/other_user}","gists_url":"https://api.github.com/users/Consamables/gists{/gist_id}","starred_url":"https://api.github.com/users/Consamables/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Consamables/subscriptions","organizations_url":"https://api.github.com/users/Consamables/orgs","repos_url":"https://api.github.com/users/Consamables/repos","events_url":"https://api.github.com/users/Consamables/events{/privacy}","received_events_url":"https://api.github.com/users/Consamables/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Consamables/AndroidPizza","description":"Olin's #1 Pizza Ordering App for Android 4.1 and Above","fork":false,"url":"https://api.github.com/repos/Consamables/AndroidPizza","forks_url":"https://api.github.com/repos/Consamables/AndroidPizza/forks","keys_url":"https://api.github.com/repos/Consamables/AndroidPizza/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Consamables/AndroidPizza/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Consamables/AndroidPizza/teams","hooks_url":"https://api.github.com/repos/Consamables/AndroidPizza/hooks","issue_events_url":"https://api.github.com/repos/Consamables/AndroidPizza/issues/events{/number}","events_url":"https://api.github.com/repos/Consamables/AndroidPizza/events","assignees_url":"https://api.github.com/repos/Consamables/AndroidPizza/assignees{/user}","branches_url":"https://api.github.com/repos/Consamables/AndroidPizza/branches{/branch}","tags_url":"https://api.github.com/repos/Consamables/AndroidPizza/tags","blobs_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/refs{/sha}","trees_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Consamables/AndroidPizza/statuses/{sha}","languages_url":"https://api.github.com/repos/Consamables/AndroidPizza/languages","stargazers_url":"https://api.github.com/repos/Consamables/AndroidPizza/stargazers","contributors_url":"https://api.github.com/repos/Consamables/AndroidPizza/contributors","subscribers_url":"https://api.github.com/repos/Consamables/AndroidPizza/subscribers","subscription_url":"https://api.github.com/repos/Consamables/AndroidPizza/subscription","commits_url":"https://api.github.com/repos/Consamables/AndroidPizza/commits{/sha}","git_commits_url":"https://api.github.com/repos/Consamables/AndroidPizza/git/commits{/sha}","comments_url":"https://api.github.com/repos/Consamables/AndroidPizza/comments{/number}","issue_comment_url":"https://api.github.com/repos/Consamables/AndroidPizza/issues/comments{/number}","contents_url":"https://api.github.com/repos/Consamables/AndroidPizza/contents/{+path}","compare_url":"https://api.github.com/repos/Consamables/AndroidPizza/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Consamables/AndroidPizza/merges","archive_url":"https://api.github.com/repos/Consamables/AndroidPizza/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Consamables/AndroidPizza/downloads","issues_url":"https://api.github.com/repos/Consamables/AndroidPizza/issues{/number}","pulls_url":"https://api.github.com/repos/Consamables/AndroidPizza/pulls{/number}","milestones_url":"https://api.github.com/repos/Consamables/AndroidPizza/milestones{/number}","notifications_url":"https://api.github.com/repos/Consamables/AndroidPizza/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Consamables/AndroidPizza/labels{/name}","releases_url":"https://api.github.com/repos/Consamables/AndroidPizza/releases{/id}","deployments_url":"https://api.github.com/repos/Consamables/AndroidPizza/deployments","created_at":"2016-10-03T23:26:02Z","updated_at":"2016-10-06T22:43:43Z","pushed_at":"2016-10-11T23:42:17Z","git_url":"git://github.com/Consamables/AndroidPizza.git","ssh_url":"git@github.com:Consamables/AndroidPizza.git","clone_url":"https://github.com/Consamables/AndroidPizza.git","svn_url":"https://github.com/Consamables/AndroidPizza","homepage":null,"size":191,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/5"},"html":{"href":"https://github.com/Consamables/AndroidPizza/pull/5"},"issue":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/issues/5"},"comments":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Consamables/AndroidPizza/statuses/40fc092502d271b8c1faf242e0e39c9048c1ce81"}}}}
{"actor":{"display_login":"sammyers"}}