Skip to content

Can't use with Facebook SDK #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kremedved opened this issue Nov 6, 2017 · 7 comments
Closed

Can't use with Facebook SDK #6

kremedved opened this issue Nov 6, 2017 · 7 comments

Comments

@kremedved
Copy link

kremedved commented Nov 6, 2017

Can't use google-signin-unity with Facebook SDK. After Facebook sign in, browser shows blank(white) screen and nothing happens.

Steps to reproduce:

  1. Create a new unity project, add facebook sdk from https://developers.facebook.com/docs/unity/downloads/ using version 7.10.1;
  2. Implement sign in with facebook;
  3. Add google-signin-unity to unity project;
  4. Build xcode project for iOS;
  5. Build app, open it, try to sign in with Facebook. After sign in, browser shows blank(white) screen and nothing happens.

If I delete /Assets/Plugins/iOS/GoogleSignIn/GoogleSignInAppController.* from my unity project, Facebook auth works correctly.

Tried with unity 5.5.2, 5.6.4;
play-services-resolver v1.2.59.0.

@Zorcher
Copy link

Zorcher commented Nov 7, 2017

I can confirm this issue is happening as I've encountered the same problem. In Android, the Facebook login works but the Google signin button does not as I'm unable to resolve all dependencies as described in issue #5

@lukezbihlyj
Copy link
Contributor

I ran into the same issue earlier today and solved it by modifying the GoogleSignInAppController.mm file directly with the following changes:

  1. Add near the top:
#import <FBSDKCoreKit/FBSDKApplicationDelegate.h>
  1. Modify these two methods to call both Google + Facebook's URL handler callbacks:
/**
 * Handle the auth URL.
 */
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary *)options {
  return
      [[GIDSignIn sharedInstance] handleURL:url
                          sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
                                 annotation:options[UIApplicationOpenURLOptionsAnnotationKey]] ||
      [[FBSDKApplicationDelegate sharedInstance] application:app
                          openURL:url
                sourceApplication:options[UIApplicationOpenURLOptionsSourceApplicationKey]
                       annotation:options[UIApplicationOpenURLOptionsAnnotationKey]];
}

/**
 * Handle the auth URL
 */
- (BOOL)application:(UIApplication *)application
              openURL:(NSURL *)url
    sourceApplication:(NSString *)sourceApplication
           annotation:(id)annotation {
  return [[GIDSignIn sharedInstance] handleURL:url
                             sourceApplication:sourceApplication
                                    annotation:annotation] ||
         [[FBSDKApplicationDelegate sharedInstance] application:application
                          openURL:url
                sourceApplication:sourceApplication
                       annotation:annotation];
}

I've only tested this on iOS so far. I'll report back if I find any issues with the Android version.

@lunarraid
Copy link

It looks like this plugin could benefit from using Unity's UnityRegisterAppDelegateListener method instead of overriding UnityAppController, which is what the Facebook SDK does.

@claywilkinson
Copy link
Contributor

This is fixed in version 1.0.2 of the plugin.

@ms250693
Copy link

Using Unity Package Version 1.0.2.
I am trying to use this package with facebook sdk but it gives me error:

CommandInvokationFailure: Failed to re-package resources.
Library/Android/sdk/build-tools/27.0.2/aapt package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "Library/Android/sdk/platforms/android-27/android.jar" -F bin/resources.ap_ --extra-packages com.facebook:com.facebook.android:com.google.nativelib.googlesignin:com.google.android.gms.auth.api:com.google.android.gms.auth:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.tasks:android.support.compat:android.support.coreui:android.support.coreutils:android.support.fragment:android.support.mediacompat:android.support.v4 -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/facebook-android-sdk-4.23.0/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/facebook-android-wrapper-7.10.1/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/google-signin-support-1.0.2/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/play-services-auth-10.2.6/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/play-services-auth-base-10.2.6/res" -S "/Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/play-services-base-10.2.6/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/play-services-basement-10.2.6/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/play-services-tasks-10.2.6/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/support-compat-25.2.0/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/support-core-ui-25.2.0/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/support-core-utils-25.2.0/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/support-fragment-25.2.0/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/support-media-compat-25.2.0/res" -S "Documents/Projects/GoogleSignIn(1.0.2)/Temp/StagingArea/android-libraries/support-v4-25.2.0/res"

@claywilkinson
Copy link
Contributor

Looks like the error was truncated - I see most of the command line, but not the actual error. Can you open a new Issue and maybe put the log in a Gist?

@storybell
Copy link

Failed to re-package resources when using with facebook SDK...any fixes???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants