title: FBSDK: Cannot read property loginwithreadpermissions of undefined
body: <p>I'm setting up a React Native project using the FBSDK for login purpose.</p>
  
  <p>Here's what I've done so far: </p>
  
  <ol>
  <li>I ran <code>npm install react-native-fbsdk --save</code></li>
  <li>I ran <code>react-native link</code></li>
  <li>I followed each step mentioned there: <a href="https://developers.facebook.com/docs/facebook-login/ios/" rel="noreferrer">https://developers.facebook.com/docs/facebook-login/ios/</a></li>
  <li>I double checked using this video: <a href="https://www.youtube.com/watch?v=rAXVKapP5cM" rel="noreferrer">https://www.youtube.com/watch?v=rAXVKapP5cM</a></li>
  </ol>
  
  <p>However, I still get this red screen error:</p>
  
  <p><code>Cannot read property logInWithReadPermissions of undefined</code> at FBLoginManager.js, line 77 (<a href="https://github.com/facebook/react-native-fbsdk/blob/master/js/FBLoginManager.js" rel="noreferrer">https://github.com/facebook/react-native-fbsdk/blob/master/js/FBLoginManager.js</a>)</p>
  
  <p>Here's my AppDelegate.m content:</p>
  
  <pre><code>#import "AppDelegate.h"
  #import &lt;FBSDKCoreKit/FBSDKCoreKit.h&gt;
  #import &lt;React/RCTBundleURLProvider.h&gt;
  #import &lt;React/RCTRootView.h&gt;
  
  @implementation AppDelegate
  
  - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
    NSURL *jsCodeLocation;
  
    jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
  
    RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
                                                        moduleName:@"PegaseBuzzApp"
                                                 initialProperties:nil
                                                     launchOptions:launchOptions];
    rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  
    [[FBSDKApplicationDelegate sharedInstance] application:application
                             didFinishLaunchingWithOptions:launchOptions];
  
  
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
    UIViewController *rootViewController = [UIViewController new];
    rootViewController.view = rootView;
    self.window.rootViewController = rootViewController;
    [self.window makeKeyAndVisible];
    return YES;
  }
  
  - (void)applicationDidBecomeActive:(UIApplication *)application {
    [FBSDKAppEvents activateApp];
  }
  
  
  - (BOOL)application:(UIApplication *)application
              openURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication
           annotation:(id)annotation {
    return [[FBSDKApplicationDelegate sharedInstance] application:application
                                                          openURL:url
                                                sourceApplication:sourceApplication
                                                       annotation:annotation];
  }
  @end
  </code></pre>
  
  <p>Here's my linked frameworks and binaries:</p>
  
  <p><a href="https://i.stack.imgur.com/Tg5xx.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/Tg5xx.jpg" alt="enter image description here"></a></p>
  
  <p>EDIT: on my project:</p>
  
  <pre><code>const FBSDK = require('react-native-fbsdk');
  const {
    LoginManager,
  } = FBSDK;
  </code></pre>
  
  <p>Plus:</p>
  
  <pre><code>_onFBButtonPress () {
      LoginManager.logInWithReadPermissions(['public_profile']).then(
        function(result) {
          if (result.isCancelled) {
            alert('Login cancelled');
          } else {
            alert('Login success with permissions: '
              +result.grantedPermissions.toString());
          }
        },
        function(error) {
          alert('Login fail with error: ' + error);
        }
      );
    }
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>&lt;Button onPress={() =&gt; this._onFBButtonPress()} buttonStyle={'buttonFb'} labelStyle={'buttonFbText'} label={I18n.t('Login.btnConnectFB')}&gt;&lt;/Button&gt;
  </code></pre>
  
  <p>What do I miss?</p>