Skip to content

Can't use with Facebook SDK #6

Closed
@kremedved

Description

@kremedved

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.

Activity

Zorcher

Zorcher commented on Nov 7, 2017

@Zorcher

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

lukezbihlyj commented on Nov 9, 2017

@lukezbihlyj
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

lunarraid commented on Nov 11, 2017

@lunarraid

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

claywilkinson commented on Nov 13, 2017

@claywilkinson
Contributor

This is fixed in version 1.0.2 of the plugin.

ms250693

ms250693 commented on Jan 22, 2018

@ms250693

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

claywilkinson commented on Jan 25, 2018

@claywilkinson
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

storybell commented on May 25, 2018

@storybell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lukezbihlyj@lunarraid@Zorcher@claywilkinson@kremedved

        Issue actions

          Can't use with Facebook SDK · Issue #6 · googlesamples/google-signin-unity