{"action":"created","comment":{"url":"https://api.github.com/repos/mihaylova/reports/pulls/comments/28583517","id":28583517,"diff_hunk":"@@ -1,15 +1,36 @@\n class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController\n   layout false\n+  before_action :parse_facebook_cookies, only: :facebook_login\n \n-  def facebook\n-    @user = User.find_for_facebook_oauth(request.env[\"omniauth.auth\"])\n+  def parse_facebook_cookies\n+    @facebook_cookies = Koala::Facebook::OAuth.new(ENV['FACEBOOK_KEY'], ENV['FACEBOOK_SECRET']).get_user_info_from_cookie(cookies)\n+  end\n+\n+  # def facebook\n+  #   @user = User.find_for_facebook_oauth(request.env[\"omniauth.auth\"])\n+\n+  #   if @user.persisted?\n+  #     sign_in @user, :event => :authentication #this will throw if @user is not activated\n+  #     set_flash_message(:notice, :success, :kind => \"Facebook\") if is_navigational_format?\n+  #     @redirect_to = root_url\n+  #   else\n+  #     session[\"devise.facebook_data\"] = request.env[\"omniauth.auth\"]\n+  #     @redirect_to = new_user_registration_url\n+  #   end\n+  # end\n+","path":"app/controllers/users/omniauth_callbacks_controller.rb","position":23,"original_position":23,"commit_id":"2e2e54bbc60a1a380e2d4bb1beb393c4349fdfc9","original_commit_id":"2e2e54bbc60a1a380e2d4bb1beb393c4349fdfc9","user":{"login":"mihaylova","id":3001657,"avatar_url":"https://avatars.githubusercontent.com/u/3001657?v=3","gravatar_id":"","url":"https://api.github.com/users/mihaylova","html_url":"https://github.com/mihaylova","followers_url":"https://api.github.com/users/mihaylova/followers","following_url":"https://api.github.com/users/mihaylova/following{/other_user}","gists_url":"https://api.github.com/users/mihaylova/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaylova/subscriptions","organizations_url":"https://api.github.com/users/mihaylova/orgs","repos_url":"https://api.github.com/users/mihaylova/repos","events_url":"https://api.github.com/users/mihaylova/events{/privacy}","received_events_url":"https://api.github.com/users/mihaylova/received_events","type":"User","site_admin":false},"body":"Remove commented code. ","created_at":"2015-04-17T10:20:29Z","updated_at":"2015-04-17T10:20:29Z","html_url":"https://github.com/mihaylova/reports/pull/1#discussion_r28583517","pull_request_url":"https://api.github.com/repos/mihaylova/reports/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/mihaylova/reports/pulls/comments/28583517"},"html":{"href":"https://github.com/mihaylova/reports/pull/1#discussion_r28583517"},"pull_request":{"href":"https://api.github.com/repos/mihaylova/reports/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/mihaylova/reports/pulls/1","id":29161716,"html_url":"https://github.com/mihaylova/reports/pull/1","diff_url":"https://github.com/mihaylova/reports/pull/1.diff","patch_url":"https://github.com/mihaylova/reports/pull/1.patch","issue_url":"https://api.github.com/repos/mihaylova/reports/issues/1","number":1,"state":"open","locked":false,"title":"Fb koala","user":{"login":"mihaylova","id":3001657,"avatar_url":"https://avatars.githubusercontent.com/u/3001657?v=3","gravatar_id":"","url":"https://api.github.com/users/mihaylova","html_url":"https://github.com/mihaylova","followers_url":"https://api.github.com/users/mihaylova/followers","following_url":"https://api.github.com/users/mihaylova/following{/other_user}","gists_url":"https://api.github.com/users/mihaylova/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaylova/subscriptions","organizations_url":"https://api.github.com/users/mihaylova/orgs","repos_url":"https://api.github.com/users/mihaylova/repos","events_url":"https://api.github.com/users/mihaylova/events{/privacy}","received_events_url":"https://api.github.com/users/mihaylova/received_events","type":"User","site_admin":false},"body":"Comment","created_at":"2015-02-12T08:54:23Z","updated_at":"2015-04-17T10:20:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mihaylova/reports/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mihaylova/reports/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mihaylova/reports/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mihaylova/reports/issues/1/comments","statuses_url":"https://api.github.com/repos/mihaylova/reports/statuses/2e2e54bbc60a1a380e2d4bb1beb393c4349fdfc9","head":{"label":"mihaylova:fb_koala","ref":"fb_koala","sha":"2e2e54bbc60a1a380e2d4bb1beb393c4349fdfc9","user":{"login":"mihaylova","id":3001657,"avatar_url":"https://avatars.githubusercontent.com/u/3001657?v=3","gravatar_id":"","url":"https://api.github.com/users/mihaylova","html_url":"https://github.com/mihaylova","followers_url":"https://api.github.com/users/mihaylova/followers","following_url":"https://api.github.com/users/mihaylova/following{/other_user}","gists_url":"https://api.github.com/users/mihaylova/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaylova/subscriptions","organizations_url":"https://api.github.com/users/mihaylova/orgs","repos_url":"https://api.github.com/users/mihaylova/repos","events_url":"https://api.github.com/users/mihaylova/events{/privacy}","received_events_url":"https://api.github.com/users/mihaylova/received_events","type":"User","site_admin":false},"repo":{"id":17488357,"name":"reports","full_name":"mihaylova/reports","owner":{"login":"mihaylova","id":3001657,"avatar_url":"https://avatars.githubusercontent.com/u/3001657?v=3","gravatar_id":"","url":"https://api.github.com/users/mihaylova","html_url":"https://github.com/mihaylova","followers_url":"https://api.github.com/users/mihaylova/followers","following_url":"https://api.github.com/users/mihaylova/following{/other_user}","gists_url":"https://api.github.com/users/mihaylova/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaylova/subscriptions","organizations_url":"https://api.github.com/users/mihaylova/orgs","repos_url":"https://api.github.com/users/mihaylova/repos","events_url":"https://api.github.com/users/mihaylova/events{/privacy}","received_events_url":"https://api.github.com/users/mihaylova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mihaylova/reports","description":"","fork":false,"url":"https://api.github.com/repos/mihaylova/reports","forks_url":"https://api.github.com/repos/mihaylova/reports/forks","keys_url":"https://api.github.com/repos/mihaylova/reports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mihaylova/reports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mihaylova/reports/teams","hooks_url":"https://api.github.com/repos/mihaylova/reports/hooks","issue_events_url":"https://api.github.com/repos/mihaylova/reports/issues/events{/number}","events_url":"https://api.github.com/repos/mihaylova/reports/events","assignees_url":"https://api.github.com/repos/mihaylova/reports/assignees{/user}","branches_url":"https://api.github.com/repos/mihaylova/reports/branches{/branch}","tags_url":"https://api.github.com/repos/mihaylova/reports/tags","blobs_url":"https://api.github.com/repos/mihaylova/reports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mihaylova/reports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mihaylova/reports/git/refs{/sha}","trees_url":"https://api.github.com/repos/mihaylova/reports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mihaylova/reports/statuses/{sha}","languages_url":"https://api.github.com/repos/mihaylova/reports/languages","stargazers_url":"https://api.github.com/repos/mihaylova/reports/stargazers","contributors_url":"https://api.github.com/repos/mihaylova/reports/contributors","subscribers_url":"https://api.github.com/repos/mihaylova/reports/subscribers","subscription_url":"https://api.github.com/repos/mihaylova/reports/subscription","commits_url":"https://api.github.com/repos/mihaylova/reports/commits{/sha}","git_commits_url":"https://api.github.com/repos/mihaylova/reports/git/commits{/sha}","comments_url":"https://api.github.com/repos/mihaylova/reports/comments{/number}","issue_comment_url":"https://api.github.com/repos/mihaylova/reports/issues/comments{/number}","contents_url":"https://api.github.com/repos/mihaylova/reports/contents/{+path}","compare_url":"https://api.github.com/repos/mihaylova/reports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mihaylova/reports/merges","archive_url":"https://api.github.com/repos/mihaylova/reports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mihaylova/reports/downloads","issues_url":"https://api.github.com/repos/mihaylova/reports/issues{/number}","pulls_url":"https://api.github.com/repos/mihaylova/reports/pulls{/number}","milestones_url":"https://api.github.com/repos/mihaylova/reports/milestones{/number}","notifications_url":"https://api.github.com/repos/mihaylova/reports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mihaylova/reports/labels{/name}","releases_url":"https://api.github.com/repos/mihaylova/reports/releases{/id}","created_at":"2014-03-06T18:41:32Z","updated_at":"2014-04-07T06:49:58Z","pushed_at":"2014-04-07T06:49:58Z","git_url":"git://github.com/mihaylova/reports.git","ssh_url":"git@github.com:mihaylova/reports.git","clone_url":"https://github.com/mihaylova/reports.git","svn_url":"https://github.com/mihaylova/reports","homepage":null,"size":664,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mihaylova:master","ref":"master","sha":"67cb19d287bd2df02dd9c01ca317460b5b45a721","user":{"login":"mihaylova","id":3001657,"avatar_url":"https://avatars.githubusercontent.com/u/3001657?v=3","gravatar_id":"","url":"https://api.github.com/users/mihaylova","html_url":"https://github.com/mihaylova","followers_url":"https://api.github.com/users/mihaylova/followers","following_url":"https://api.github.com/users/mihaylova/following{/other_user}","gists_url":"https://api.github.com/users/mihaylova/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaylova/subscriptions","organizations_url":"https://api.github.com/users/mihaylova/orgs","repos_url":"https://api.github.com/users/mihaylova/repos","events_url":"https://api.github.com/users/mihaylova/events{/privacy}","received_events_url":"https://api.github.com/users/mihaylova/received_events","type":"User","site_admin":false},"repo":{"id":17488357,"name":"reports","full_name":"mihaylova/reports","owner":{"login":"mihaylova","id":3001657,"avatar_url":"https://avatars.githubusercontent.com/u/3001657?v=3","gravatar_id":"","url":"https://api.github.com/users/mihaylova","html_url":"https://github.com/mihaylova","followers_url":"https://api.github.com/users/mihaylova/followers","following_url":"https://api.github.com/users/mihaylova/following{/other_user}","gists_url":"https://api.github.com/users/mihaylova/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaylova/subscriptions","organizations_url":"https://api.github.com/users/mihaylova/orgs","repos_url":"https://api.github.com/users/mihaylova/repos","events_url":"https://api.github.com/users/mihaylova/events{/privacy}","received_events_url":"https://api.github.com/users/mihaylova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mihaylova/reports","description":"","fork":false,"url":"https://api.github.com/repos/mihaylova/reports","forks_url":"https://api.github.com/repos/mihaylova/reports/forks","keys_url":"https://api.github.com/repos/mihaylova/reports/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mihaylova/reports/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mihaylova/reports/teams","hooks_url":"https://api.github.com/repos/mihaylova/reports/hooks","issue_events_url":"https://api.github.com/repos/mihaylova/reports/issues/events{/number}","events_url":"https://api.github.com/repos/mihaylova/reports/events","assignees_url":"https://api.github.com/repos/mihaylova/reports/assignees{/user}","branches_url":"https://api.github.com/repos/mihaylova/reports/branches{/branch}","tags_url":"https://api.github.com/repos/mihaylova/reports/tags","blobs_url":"https://api.github.com/repos/mihaylova/reports/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mihaylova/reports/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mihaylova/reports/git/refs{/sha}","trees_url":"https://api.github.com/repos/mihaylova/reports/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mihaylova/reports/statuses/{sha}","languages_url":"https://api.github.com/repos/mihaylova/reports/languages","stargazers_url":"https://api.github.com/repos/mihaylova/reports/stargazers","contributors_url":"https://api.github.com/repos/mihaylova/reports/contributors","subscribers_url":"https://api.github.com/repos/mihaylova/reports/subscribers","subscription_url":"https://api.github.com/repos/mihaylova/reports/subscription","commits_url":"https://api.github.com/repos/mihaylova/reports/commits{/sha}","git_commits_url":"https://api.github.com/repos/mihaylova/reports/git/commits{/sha}","comments_url":"https://api.github.com/repos/mihaylova/reports/comments{/number}","issue_comment_url":"https://api.github.com/repos/mihaylova/reports/issues/comments{/number}","contents_url":"https://api.github.com/repos/mihaylova/reports/contents/{+path}","compare_url":"https://api.github.com/repos/mihaylova/reports/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mihaylova/reports/merges","archive_url":"https://api.github.com/repos/mihaylova/reports/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mihaylova/reports/downloads","issues_url":"https://api.github.com/repos/mihaylova/reports/issues{/number}","pulls_url":"https://api.github.com/repos/mihaylova/reports/pulls{/number}","milestones_url":"https://api.github.com/repos/mihaylova/reports/milestones{/number}","notifications_url":"https://api.github.com/repos/mihaylova/reports/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mihaylova/reports/labels{/name}","releases_url":"https://api.github.com/repos/mihaylova/reports/releases{/id}","created_at":"2014-03-06T18:41:32Z","updated_at":"2014-04-07T06:49:58Z","pushed_at":"2014-04-07T06:49:58Z","git_url":"git://github.com/mihaylova/reports.git","ssh_url":"git@github.com:mihaylova/reports.git","clone_url":"https://github.com/mihaylova/reports.git","svn_url":"https://github.com/mihaylova/reports","homepage":null,"size":664,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mihaylova/reports/pulls/1"},"html":{"href":"https://github.com/mihaylova/reports/pull/1"},"issue":{"href":"https://api.github.com/repos/mihaylova/reports/issues/1"},"comments":{"href":"https://api.github.com/repos/mihaylova/reports/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mihaylova/reports/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mihaylova/reports/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mihaylova/reports/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mihaylova/reports/statuses/2e2e54bbc60a1a380e2d4bb1beb393c4349fdfc9"}}}}