{"action":"created","issue":{"url":"https://api.github.com/repos/magus/react-native-facebook-login/issues/151","repository_url":"https://api.github.com/repos/magus/react-native-facebook-login","labels_url":"https://api.github.com/repos/magus/react-native-facebook-login/issues/151/labels{/name}","comments_url":"https://api.github.com/repos/magus/react-native-facebook-login/issues/151/comments","events_url":"https://api.github.com/repos/magus/react-native-facebook-login/issues/151/events","html_url":"https://github.com/magus/react-native-facebook-login/issues/151","id":172551401,"number":151,"title":"Getting react-native-fbsdk LoginManager object when remote debugging disabled?","user":{"login":"teepark","id":37182,"avatar_url":"https://avatars.githubusercontent.com/u/37182?v=3","gravatar_id":"","url":"https://api.github.com/users/teepark","html_url":"https://github.com/teepark","followers_url":"https://api.github.com/users/teepark/followers","following_url":"https://api.github.com/users/teepark/following{/other_user}","gists_url":"https://api.github.com/users/teepark/gists{/gist_id}","starred_url":"https://api.github.com/users/teepark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/teepark/subscriptions","organizations_url":"https://api.github.com/users/teepark/orgs","repos_url":"https://api.github.com/users/teepark/repos","events_url":"https://api.github.com/users/teepark/events{/privacy}","received_events_url":"https://api.github.com/users/teepark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-08-22T20:50:14Z","updated_at":"2016-08-22T21:15:02Z","closed_at":null,"body":"This is so strange. In one file I have:\r\n\r\n```javascript\r\nimport {\r\n  GraphRequest,\r\n  GraphRequestManager,\r\n} from 'react-native-fbsdk'\r\n\r\nimport { FBLoginManager } from 'react-native-facebook-login'\r\n\r\nconsole.log(\"FBLoginManager:\", FBLoginManager)\r\n```\r\n\r\n(I need both because I make graph API requests, but also want the token-caching behavior of `react-native-facebook-login`)\r\n\r\nWhen I run the app with *remote debugging* turned on, the app works fine and the log shows me what I expect to see:\r\n\r\n```\r\nFBLoginManager: Object { Events: Object, LoginBehaviors: Object}\r\n    Events: Object\r\n    LoginBehaviors: Object\r\n    getCredentials: fn()\r\n    login: fn()\r\n    loginWithPermissions: fn()\r\n    logout: fn()\r\n    setLoginBehavior: fn()\r\n    __proto__: Object\r\n```\r\n\r\nBut if I turn off remote debugging, it shows me the methods of the `LoginManager` from `react-native-fbsdk`:\r\n\r\n```\r\n'FBLoginManager:', { setLoginBehavior: { [Function: fn] type: 'remote' },\r\n  setDefaultAudience: { [Function: fn] type: 'remote' },\r\n  getLoginBehavior: { [Function: fn] type: 'remoteAsync' },\r\n  getDefaultAudience: { [Function: fn] type: 'remoteAsync' },\r\n  logInWithReadPermissions: { [Function: fn] type: 'remoteAsync' },\r\n  logInWithPublishPermissions: { [Function: fn] type: 'remoteAsync' },\r\n  logOut: { [Function: fn] type: 'remote' } }\r\n```\r\n\r\nAnd of course production builds are broken, having the same wrong login manager object as dev builds without remote debugging.\r\n\r\nI have no idea why it would be exposing the wrong object, or especially why it would be gated on remote debugging, but I can reliably reproduce these behaviors.\r\n\r\nEDIT: this is on iOS"},"comment":{"url":"https://api.github.com/repos/magus/react-native-facebook-login/issues/comments/241552897","html_url":"https://github.com/magus/react-native-facebook-login/issues/151#issuecomment-241552897","issue_url":"https://api.github.com/repos/magus/react-native-facebook-login/issues/151","id":241552897,"user":{"login":"lwhiteley","id":6108793,"avatar_url":"https://avatars.githubusercontent.com/u/6108793?v=3","gravatar_id":"","url":"https://api.github.com/users/lwhiteley","html_url":"https://github.com/lwhiteley","followers_url":"https://api.github.com/users/lwhiteley/followers","following_url":"https://api.github.com/users/lwhiteley/following{/other_user}","gists_url":"https://api.github.com/users/lwhiteley/gists{/gist_id}","starred_url":"https://api.github.com/users/lwhiteley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwhiteley/subscriptions","organizations_url":"https://api.github.com/users/lwhiteley/orgs","repos_url":"https://api.github.com/users/lwhiteley/repos","events_url":"https://api.github.com/users/lwhiteley/events{/privacy}","received_events_url":"https://api.github.com/users/lwhiteley/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T21:15:02Z","updated_at":"2016-08-22T21:15:02Z","body":"so next steps from here since this is a third party module is to namespace our `FBLoginManager` to possibly `MFBLoginManager`\r\n\r\nif you want to get ahead of me or @magus,  you can submit a working PR if possible 👍  :)"}}
{"actor":{"display_login":"lwhiteley"}}