title: facebook login with react native Error Cannot read property 'logInWithReadPermissions' of undefined
body: <p>I am using react-native-fbsdk for login in react-native app. after all setup , I am getting some error.</p>
  
  <p>code I used for login action </p>
  
  <pre><code>facebook = () =&gt; {
       console.log("LoginManager ", LoginManager);
      console.log("Login  ", LoginManager.logInWithReadPermissions);
  
      LoginManager.logInWithReadPermissions([
        "public_profile"
      ]).then(result =&gt; {
        if (result.isCancelled) {
          console.log("Login cancelled");
        } else {
          console.log(
            "Login success with permissions",
            result.grantedPermissions.toString()
          );
        }
      });
    };
  </code></pre>
  
  <p>now here is my console output 1 :</p>
  
  <pre><code>LoginManager  
  Object {logInWithReadPermissions: function, logInWithPublishPermissions: function, getLoginBehavior: function, setLoginBehavior: function, getDefaultAudience: function…}
  getDefaultAudience
  :
  function getDefaultAudience()
  getLoginBehavior
  :
  function getLoginBehavior()
  logInWithPublishPermissions
  :
  function logInWithPublishPermissions(permissions)
  logInWithReadPermissions
  :
  function logInWithReadPermissions(permissions)
  logOut
  :
  function logOut()
  setDefaultAudience
  :
  function setDefaultAudience(defaultAudience)
  setLoginBehavior
  :
  function setLoginBehavior(loginBehavior)
  </code></pre>
  
  <p>now here is my console output 2 :</p>
  
  <pre><code>function logInWithReadPermissions(permissions) {
      return LoginManager.logInWithReadPermissions(permissions);
    }
  </code></pre>
  
  <p>Error :
  Cannot read property 'logInWithReadPermissions' of undefined
  what is missing here not able to get .</p>
  
  <p><a href="https://i.stack.imgur.com/fqXBA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fqXBA.png" alt="enter image description here"></a></p>