facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

null is not an object (evaluating 'LoginManager.logWithPermission') #607

Closed dev-intellisoft closed 5 years ago

dev-intellisoft commented 5 years ago

🐛 Bug Report

To Reproduce

Expected Behavior

Code Example

Environment

dev-intellisoft commented 5 years ago

My AppDelegate.m

is like that

/**

import "AppDelegate.h"

import <React/RCTBridge.h>

import <React/RCTBundleURLProvider.h>

import <React/RCTRootView.h>

import <FBSDKCoreKit/FBSDKCoreKit.h>

@implementation AppDelegate

My package.json is like this

{ "name": "ReactLogin", "version": "0.0.1", "private": true, "scripts": { "start": "react-native start", "test": "jest", "lint": "eslint ." }, "dependencies": { "react": "16.8.6", "react-native": "0.60.4", "react-native-fbsdk": "^0.10.1" }, "devDependencies": { "@babel/core": "^7.5.5", "@babel/runtime": "^7.5.5", "@react-native-community/eslint-config": "^0.0.5", "babel-jest": "^24.8.0", "eslint": "^6.1.0", "jest": "^24.8.0", "metro-react-native-babel-preset": "^0.55.0", "react-test-renderer": "16.8.6" }, "jest": { "preset": "react-native" } }

rohanrana commented 5 years ago

You have to download the latest facebook sdk because this SDK is not working and will run into errors

this solution solved my problem

allthetime commented 5 years ago

You have a type as well, it's

LogInWithPermissions

Note the capital I for In

smooJitter commented 5 years ago

@rohanrana which file did you download. I tried the source folder but the contents does reveal framework files

dev-intellisoft commented 5 years ago

You have a type as well, it's

LogInWithPermissions

Note the capital I for In Yeah I wrote "logInWithPermission" and the error persists. I just mistype on I wrote here.

rohanrana commented 5 years ago

@smooJitter just see the image you have to download this zip file Screenshot 2019-08-01 at 10 40 47 AM

babaiyu commented 5 years ago

@smooJitter just see the image you have to download this zip file Screenshot 2019-08-01 at 10 40 47 AM

Hi @smooJitter I Just follow you for this solution, but there is still error

Screen Shot 2019-08-01 at 15 24 34
dev-intellisoft commented 5 years ago

@babaiyu I just make it work it`s pretty simple. dont need do add nothings

1 - after you run the command "react-native init [your project]"

2 - add on your package.json { ... "react": "16.8.6", "react-native": "0.60.4", "react-native-fbsdk": "git+https://github.com/facebook/react-native-fbsdk.git", ... }

3 - on you Podfile pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'

4 - after yarn or npm your project go to ios folder pod install

and that is it!

dev-intellisoft commented 5 years ago

Hello everybody I am going to close this issue I think a gave a lot precious tips can solve problems.