{"action":"created","issue":{"url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/1063","repository_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin","labels_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/1063/labels{/name}","comments_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/1063/comments","events_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/1063/events","html_url":"https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1063","id":94344808,"number":1063,"title":"First call to login is causing 4201 : User cancelled dialog","user":{"login":"KeKs0r","id":2970814,"avatar_url":"https://avatars.githubusercontent.com/u/2970814?v=3","gravatar_id":"","url":"https://api.github.com/users/KeKs0r","html_url":"https://github.com/KeKs0r","followers_url":"https://api.github.com/users/KeKs0r/followers","following_url":"https://api.github.com/users/KeKs0r/following{/other_user}","gists_url":"https://api.github.com/users/KeKs0r/gists{/gist_id}","starred_url":"https://api.github.com/users/KeKs0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KeKs0r/subscriptions","organizations_url":"https://api.github.com/users/KeKs0r/orgs","repos_url":"https://api.github.com/users/KeKs0r/repos","events_url":"https://api.github.com/users/KeKs0r/events{/privacy}","received_events_url":"https://api.github.com/users/KeKs0r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-07-10T16:47:38Z","updated_at":"2016-02-29T09:29:39Z","closed_at":null,"body":"I am integrating Facebook login with this plugin in my app.\r\n\r\nBut when calling the `facebookConnectPlugin.login` the first time always results in a 4201.\r\n`\"{\"errorCode\":\"4201\",\"errorMessage\":\"User cancelled dialog\"}\"`\r\n\r\nAlthough I am not cancelling, it happens automatically. Is someone else experiencing something similar?\r\n"},"comment":{"url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/comments/190121727","html_url":"https://github.com/Wizcorp/phonegap-facebook-plugin/issues/1063#issuecomment-190121727","issue_url":"https://api.github.com/repos/Wizcorp/phonegap-facebook-plugin/issues/1063","id":190121727,"user":{"login":"Freundschaft","id":5065616,"avatar_url":"https://avatars.githubusercontent.com/u/5065616?v=3","gravatar_id":"","url":"https://api.github.com/users/Freundschaft","html_url":"https://github.com/Freundschaft","followers_url":"https://api.github.com/users/Freundschaft/followers","following_url":"https://api.github.com/users/Freundschaft/following{/other_user}","gists_url":"https://api.github.com/users/Freundschaft/gists{/gist_id}","starred_url":"https://api.github.com/users/Freundschaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Freundschaft/subscriptions","organizations_url":"https://api.github.com/users/Freundschaft/orgs","repos_url":"https://api.github.com/users/Freundschaft/repos","events_url":"https://api.github.com/users/Freundschaft/events{/privacy}","received_events_url":"https://api.github.com/users/Freundschaft/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T09:29:39Z","updated_at":"2016-02-29T09:29:39Z","body":"I figured out what was causing the issue by the way.\r\nEspecially for ionic users: take care that you check with facebookConnectPlugin.getLoginStatus(Function success, Function failure)\r\nbefore you actually log in, because if the user is already logged in, then the login will fail with a confusing error message.\r\n\r\nDoing this fixed my issues, but I have to add that I am using not the original plugin, but the SDK version 4 version: https://github.com/jeduan/cordova-plugin-facebook4"}}