React-native-fbsdk: Initializing 'FBSDKLoginManagerLoginResult *' with an expression of incompatible type 'void (^)(FBSDKLoginManagerLoginResult *__strong, NSError *__strong)'

Created on 20 Jun 2019  ·  13Comments  ·  Source: facebook/react-native-fbsdk

I'm getting Error while following the instruction in the installation process.

Initializing 'FBSDKLoginManagerLoginResult *' with an expression of incompatible type 'void (^)(FBSDKLoginManagerLoginResult *__strong, NSError *__strong)'

Any Help from the community ?

🐛 Bug Report

To Reproduce

Expected Behavior

Code Example

Environment

Most helpful comment

Same issue, anybody find solution?

Screen Shot 2019-06-22 at 15 00 34

Screen Shot 2019-06-22 at 15 00 52

All 13 comments

You need to update the fbsdk to v5, see release notes https://github.com/facebook/react-native-fbsdk/releases/tag/0.10.0

Same issue, anybody find solution?

Screen Shot 2019-06-22 at 15 00 34

Screen Shot 2019-06-22 at 15 00 52

I solved this by using CocoaPods and installing Facebook SDK version 5, following was my PodFile, try this and let me know if any issue:

Uncomment the next line to define a global platform for your project

platform :ios, '9.0'

target 'ssbPath (Use your project name here)' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!

# Pods for ssbPath

pod 'FBSDKCoreKit', '~> 5.0.0'
pod 'FBSDKLoginKit', '~> 5.0.0'
pod 'FBSDKShareKit', '~> 5.0.0'
pod 'FBAudienceNetwork', '~> 5.0.0'

pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'

pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

end

Can You Do a Quick Screenshare meeting with me so that i Can guide.. Zoom will work fine, contact me on vicky.[email protected]

Have you been able to solve the issue? It occurs with me as well.

Yes

Thanks & Regards
Vivek Singh

On Fri, Jun 28, 2019 at 11:43 AM Szalay Balázs notifications@github.com
wrote:

Have you been able to solve the issue? It occurs with me as well.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native-fbsdk/issues/570?email_source=notifications&email_token=ACBD3NNIKXBLHZKCSKCVIZLP4WTYPA5CNFSM4HZOM7VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYZFLEQ#issuecomment-506615186,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACBD3NJV4LIR4KSEKPNRLLTP4WTYPANCNFSM4HZOM7VA
.

Getting same error .Please help!

Please contact me on hangout vicky.[email protected], let me try my fix.

Thanks & Regards
Vivek Singh

On Tue, Jul 2, 2019 at 2:43 PM ShrutiGarg019 notifications@github.com
wrote:

Getting same error .Please help!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native-fbsdk/issues/570?email_source=notifications&email_token=ACBD3NOROE5UX6PKWHGG5HDP5ML4RA5CNFSM4HZOM7VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZAT4FQ#issuecomment-507592214,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACBD3NKUGGTWEYRJD6TN54LP5ML4RANCNFSM4HZOM7VA
.

Same error happening here too... no single step by stepper provided a working solution

This error exists even after upgrading to 5.0.0. And it is also there on 4.42.0. Someone please post a step-by-step method on how to resolve this issue

I'm Creating Step by Step Method for this. Please give me a day. I'm
working on that only.

Thanks & Regards
Vivek Singh

On Wed, Jul 10, 2019 at 3:15 PM ajay-srinivas notifications@github.com
wrote:

This error exists even after upgrading to 5.0.0. And it is also there on
4.42.0. Someone please post a step-by-step method on how to resolve this
issue


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/facebook/react-native-fbsdk/issues/570?email_source=notifications&email_token=ACBD3NN24FUWAM6LCTXZPVLP6WVSHA5CNFSM4HZOM7VKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZS5XXI#issuecomment-509991901,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACBD3NPSURLUBPW5EB22QLLP6WVSHANCNFSM4HZOM7VA
.

Here is a step-by-step guide to solve this error :-

  • Make sure you are using either the Cocoapods or FacebookSDK downloaded directly from $(HOME)/Documents/FacebookSDK
  • Also the path in the Framework Search Paths should be $(HOME)/Documents/FacebookSDK instead of ~/Documents/FacebookSDK which doesn't work now.
  • If you are using this working SDK from Facebook which is v4.40.0 as of now, run react-native unlink react-native-fbsdk; need not use this npm module.

After 3 continuous days of efforts to solve this issue, figuring out the right version of libraries to use, this is how I got it working at the end.

@ajays97 this one worked for me

Also the path in the Framework Search Paths should be $(HOME)/Documents/FacebookSDK instead of ~/Documents/FacebookSDK which doesn't work now.

Thanks

Was this page helpful?
0 / 5 - 0 ratings