{"action":"opened","issue":{"url":"https://api.github.com/repos/telepat-io/telepat-api/issues/8","labels_url":"https://api.github.com/repos/telepat-io/telepat-api/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/telepat-io/telepat-api/issues/8/comments","events_url":"https://api.github.com/repos/telepat-io/telepat-api/issues/8/events","html_url":"https://github.com/telepat-io/telepat-api/issues/8","id":113821821,"number":8,"title":"Facebook Login/Registration Questions","user":{"login":"aaronfranco","id":11521696,"avatar_url":"https://avatars.githubusercontent.com/u/11521696?v=3","gravatar_id":"","url":"https://api.github.com/users/aaronfranco","html_url":"https://github.com/aaronfranco","followers_url":"https://api.github.com/users/aaronfranco/followers","following_url":"https://api.github.com/users/aaronfranco/following{/other_user}","gists_url":"https://api.github.com/users/aaronfranco/gists{/gist_id}","starred_url":"https://api.github.com/users/aaronfranco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaronfranco/subscriptions","organizations_url":"https://api.github.com/users/aaronfranco/orgs","repos_url":"https://api.github.com/users/aaronfranco/repos","events_url":"https://api.github.com/users/aaronfranco/events{/privacy}","received_events_url":"https://api.github.com/users/aaronfranco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-28T13:33:05Z","updated_at":"2015-10-28T13:33:05Z","closed_at":null,"body":"When a new users attempts to register with Facebook, the system attempts to collect their Facebook Friends list.\r\nThe code performing this action on line 227 in Users controller.\r\n````\r\nif (accessToken) {\r\n\tFB.napi('/me/friends', {access_token: accessToken}, function(err, result) {\r\n\t\tif (err) return callback(err);\r\n\t\t\tfor(var f in result.data) {\r\n\t\t\t\tfbFriends.push(result.data[f].id);\r\n\t\t\t\t}\r\n\t\t\t\t\tcallback();\r\n\t\t\t\t});\r\n} else\r\n      callback();\r\n````\r\nA typical FB request will only return a certain number of results. I think the maximum is 20 results per page. For a user with 500 friends, 25 requests would have to be made to FB to collect their entire friend list. Therefore, this bit of code is incomplete.\r\n\r\nWhat is the thinking behind getting the user's Facebook friend list upon registration?\r\n\r\nDoes the API really need to do this?\r\n\r\nFood for thought :)"}}