Fbsdk (New Facebook Sdk 4.0) Implementation Is Not Working for Login with Facebook

FBSDK (New Facebook SDK 4.0) Implementation is not working for Login with Facebook

You cant get Email id from Facebook Login....why???

If your Facebook account registered using "Mobile Number", and you do not have Email in same account.

Check this scenario. This might be happening, We cant blame for it to FBSDK.

Hope this will clear some points.

Failed to resolve: com.facebook.android:facebook-android-sdk:[4,5)

Follow the below procedure to resolve the issue:-

  1. Click on Project Structure from the icon available in the tool bar above.

  2. Open Dependencies tab.

  3. select

    com.facebook.android:facebook-android-sdk:[4,5)

  4. Remove the facebook dependency by clicking the minus(-) button on the extreme right side.

  5. Now, Click on Plus(+) button on the right side above Minus button. Select Library dependency

  6. Type Facebook on the search input box and click on the search button.

  7. Choose com.facebook.android:facebook-login. click on Ok.
    Sync your Gradle.

This will resolve your issue. As it has worked for me.

Android Facebook SDK 4.0 Login: Error when user is logged in Facebook App

Go to your Facebook Apps and select your APP and click on the Status & review then select and change it to YES for Do you want to make this app and all its live features available to the general public?

Sample Image

React Native FBSDK Login - Login with app fails

I fixed it.

The issue is in The AppDelegate.m. The file can only have one method for openUrl. It was two of them now, so I had to merge them. This worked:

- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {

BOOL handledFB = [[FBSDKApplicationDelegate sharedInstance] application:application
openURL:url
sourceApplication:sourceApplication
annotation:annotation
];

BOOL handledRCT = [RCTLinkingManager application:application openURL:url sourceApplication:sourceApplication annotation:annotation];

return handledFB || handledRCT;
}

Facebook SDK & custom button Login in react-native 0.60+ not working

You must add libRTCFBSDK.a file in the Link binary with Libraries . To fix the 'FBSDKShareKit.h isn't found' issue change ~/Documents/FacebookSDK to $(HOME)/Documents/FacebookSDK

Android facebook login not working with installed Facebook app

Check out the bottom of step 4: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/

If you have not entered your app key hash properly, Facebook login via the WebView popup (if the app is not installed) will still work, but login via the native Facebook app won't.

You should see this exception in LogCat:

com.facebook.http.protocol.ApiException: remote_app_id does not match stored id

The Facebook SDK prints its exceptions so check there anyway if there are other problems.

Facebook SDK 4 for Android - how to log out programmatically

You can use LoginManager.getInstance().logOut();, even if you use LoginButton because

This UI element wraps functionality available in the LoginManager.

EDIT:
Just to mention that this works for Facebook SDK v4. I don't know if they will change it in the future.

@as batoutofhell mention, don't forget to put FacebookSdk.sdkInitialize(getApplicationContext()); to initialize the facebook sdk. Please see here for the details.



Related Topics



Leave a reply



Submit