Quantcast
Channel: Questions in topic: "facebook-sdk-unity"
Viewing all 786 articles
Browse latest View live

Hello guys i am new in using Facebook in unity

$
0
0
![alt text][1] Hello guys i am having problem with Facebook SDK any idea how to fix that? [1]: /storage/temp/154723-unity.png

iOS : Why does the facebook sign in prompt not cancel when click on cancel?

$
0
0
I'm using Unity 2019.3.0f3 and Facebook SDK Unity version 7.19.1 I've integrated it successfully on iOS and Android. I set the FB init in a Start() but i also have an auto-login mechanism in Start() as well. On a fresh install of the app in iOS, when i click on the Facebook button a prompt appears saying that Facebook wants to sign in and can either choose to Cancel or Continue. Both options work well on this first time. Once signed in and the apps been used, say the app gets restarted which is where the auto-login mechanism works. If the app is restarted and if the string in PlayerPrefs (set the first time, which is "Facebook") matches then it should login but FBSDK on iOS will show the same prompt as first time and even if click on cancel, it automatically signs in. It shouldn't sign in if clicked on Cancel though. Why does this happen and how do i fix this? the start and facebook login : public void Start() { if (!FB.IsInitialized) { Debug.Log("FB not initialized. Initializing now."); // Initialize the Facebook SDK FB.Init(InitCallback, OnHideUnity); } else { // Already initialized, signal an app activation App Event Debug.Log("activate app on start if fb initialized."); FB.ActivateApp(); } if (PlayerPrefs.GetString("email") != "" && PlayerPrefs.GetString("password") != "") { string login_useremail = PlayerPrefs.GetString("email"); string login_password = PlayerPrefs.GetString("password"); LoadingPage.SetActive(true); loggingIn = true; if (PlayerPrefs.GetString("SocialPlatform", "Facebook") == "Facebook") { //StartCoroutine(LoginUserViaFacebook(login_useremail, login_password)); StartCoroutine(LogIntoFacebook()); } } } IEnumerator LogIntoFacebook() { while(fbactivated == false) { yield return new WaitForSecondsRealtime(0.2f); Debug.Log("Facebook cannot login becae its not activated yet."); } if(fbactivated == true) { Debug.Log("Facebook is activated"); FacebookLogin(); } } public void FacebookLogin() { var perms = new List() { "public_profile", "email" }; FB.LogInWithReadPermissions(perms, AuthCallback); } I'm assuming its this that's controlling the Cancel or Continue? But ignores the Cancel on auto-login. > FB.LogInWithReadPermissions(perms, AuthCallback);

You cannot show two modal windows at once UnityEngine.GUI:ModalWindow(Int32, Rect, WindowFunction, String, GUIStyle) Facebook.Unity.Editor.EditorFacebookMockDialog:OnGUI()

$
0
0
**Hello guys i am trying to share via Facebook.** Any idea how to solve this? --------------------------------------------------------------------------------------------------------------------- *You cannot show two modal windows at once UnityEngine.GUI:ModalWindow(Int32, Rect, WindowFunction, String, GUIStyle) Facebook.Unity.Editor.EditorFacebookMockDialog:OnGUI()* ---------------------------------------------------------------------------------------------------------------------- *ArgumentException: Getting control 0's position in a group with only 0 controls when doing repaint Aborting UnityEngine.GUILayoutGroup.GetNext () (at C:/buildslave/unity/build/Modules/IMGUI/LayoutGroup.cs:122) UnityEngine.GUILayoutUtility.DoGetRect (System.Single minWidth, System.Single maxWidth, System.Single minHeight, System.Single maxHeight, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:461) UnityEngine.GUILayoutUtility.GetRect (System.Single width, System.Single height, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayoutUtility.cs:438) UnityEngine.GUILayout.Space (System.Single pixels) (at C:/buildslave/unity/build/Modules/IMGUI/GUILayout.cs:217) Facebook.Unity.Editor.EditorFacebookMockDialog.OnGUIDialog (System.Int32 windowId) (at <32e2d7529130403a97ed84b349085718>:0) UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at C:/buildslave/unity/build/Modules/IMGUI/GUI.cs:1635)*

How can I make Audience Network's Banner on a separate block not covering my game content?

$
0
0
Like Admob's banner it's resize the game screen and it makes a separate place for putting the banner ad. can I do the same with audience network? is there any solution?

Invalid Key Hash When Open On Device

$
0
0
when i login with Facebook from my unity app it gives me an invalid hash key error. when i uninstall or disable my Facebook APP from setting. and again login with Facebook from my unity app it logins without any error. 1. Local Build without FB App on device - Works 2. Local Build with FB App on the device - Doesn't work, Invalid key hash Error

Which Keystore to use for release build?

$
0
0
When I started building my app with Google app signing, I had my own basic keystore but now that I use app signing which keystore do I use when building my app. I ask because I can't login in to Facebook with the release version of my game

Unity Facebook release build login

$
0
0
I've changed my key hash on the Facebook developer page to the release key I got from app signing on Google developer page using this site http://tomeko.net/online_tools/hex_to_base64.php but I still cant login to Facebook from my app

Facebook Integration to Unity 2019.2 Android crashes

$
0
0
Good day, I was trying to integrate Facebook, I used the sample package in Facebook's SDK download. When every time I ran the app on an Android device, it crashes. Error says that, the Class was not found, class name was Facebook.ContentFinder. When I checked the APK's Manifest, I can see the FacebookContentFinder. Any way to fix this?

Facebook Sdk question

$
0
0
I wanna test the Facebook Sdk on my phone, I can't even get it to log in on my phone. I wonder if I'm building the apk wrong. I used my keystore and ticked the development build option before building. The error I get is attached, your assistance is appreciated ![alt text][1] [1]: /storage/temp/160029-screenshot-20200521-075634.png

Unity Facebook API read page comments on a post

$
0
0
I have been going through the graph api of facebook but have had a difficult time discerning on how to extract comments from a user's post in their Facebook page. I understand that the user needs to first log in through the unity app to gain an access key, but I am confused as to how to read page comments, along with identifying username of those making the respective comments. Any idea on where I should start to get this accomplished? Thank you

Facebook SDK - Login Issue on iOS: No Prompt/Login Dialog

$
0
0
I'm using Facebook SDK 7.16.0 and the target iOS version is 13.0. I've created a fb app which is still in development mode, used the fb app id and client token and followed all the steps from the fb guide to set up the login. I tested it in the editor, used the access token and it's working. Now, when I wanted to test it on the iPad, I created a build. Unfortunately SDK 7.20.0 wasn't working as it had a bug. So, I downgraded to 7.16. No bugs. When I hit the login button, it threw the following error. > -canOpenURL: failed for URL: "fbauth2:/" - error: "The operation> couldn’t be completed. (OSStatus error > -10814.)" So, I installed the Facebook App and tried again. The login doesn't bring up the app or safari to login via facebook and instead in the result IsCancelled is true. Why? What am I missing? FB.LogInWithReadPermissions(new List() { "public_profile", "email", "user_friends" }, delegate(ILoginResult result) { if (result == null) { Debug.Log("result empty."); } if (!string.IsNullOrEmpty(result.Error)) { Debug.Log("error -" + result.Error); } else if (result.Cancelled) { Debug.Log("cancelled"); } else if (!string.IsNullOrEmpty(result.RawResult)) { Debug.Log("success - check result"); } } );

facebook instant game is not loading in messenger.

$
0
0
I have created a webgl game and hosted it on facebook instant game web hosting. By following this https://answers.unity.com/questions/1497569/facebook-webgl-instant-game-stuck-at-0-loading.html I was able to run my game on the web but it is not loading on the mobile messenger

Can I publish my game on Facebook?

$
0
0
I look for the way to publish Unity game to Facebook but looks like Unity had supported Facebook platform once but now the feature is removed. Facebook developer pages said now the Unity Facebook game is combined with WebGl. But I can't upload my webgl game to Facebook and the latest Facebook SDK showed some APIs are obsolete when I tried to install it. So is it possible I publish my WebGl game on Facebook?

Need help with importing Facebook SDK

$
0
0
When I import the facebook SDK to any of the latest versions of Unity it gives me a error telling me the Unity.UI namespace is missing. This stops all of my UI from working and does not allow me to build. Really unsure what I am doing wrong as its meant to be really simple. I really hope you guys can help me.

Firebase Remote Config and Facebook Audience Network SDK conflict

$
0
0
So we will be using Firebase Remote Config, Admob and Facebook Audience Network for our games. My process in importing these package is: - Import Firebase Remote Config. - Import Google Admob. - Do some test in EDITOR and development build for ANDROID and see if this 2 SDKs works together. - Yes! They both work with each other perfectly without error and any warnings. - Next I Import the Facebook Audience Network SDK. Import successful. No errors no warning. - I did some test again and this time Firebase Remote Config only initialized in EDITOR if I create build for Android it stops working. No errors in build whatsoever. I have searched and tried different things for almost 2 weeks now. But it is still not working. I hope somebody can help me to solve this problem. I am gameplay programmer and I have very poor knowledge on this stuff. Thank you in advance!

UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors

$
0
0
Hello, I faced such a problem, after installing the Facebook SDK, when building the build, the following 3 errors occur ------------------------------------------------------------------------------------------------------------------------ Failed running C:\Users\ashen\Desktop\Unity\2019.3.13f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="C:\Users\ashen\Desktop\Unity\Light The Runes\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:/Users/ashen/Desktop/Unity/2019.3.13f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:/Users/ashen/Desktop/Unity/2019.3.13f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="C:/Users/ashen/Desktop/Unity/2019.3.13f1/Editor/Data/PlaybackEngines/AndroidPlayer/NDK" --profiler-report --map-file-parser=C:/Users/ashen/Desktop/Unity/2019.3.13f1/Editor/Data/Tools/MapFileParser/MapFileParser.exe --directory="C:/Users/ashen/Desktop/Unity/Light The Runes/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="C:/Users/ashen/Desktop/Unity/Light The Runes/Temp/StagingArea/Il2Cpp/il2cppOutput" stdout: Building libil2cpp.so with AndroidToolChain Output directory: C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a Cache directory: C:\Users\ashen\Desktop\Unity\Light The Runes\Library\il2cpp_android_armeabi-v7a\il2cpp_cache ObjectFiles: 209 of which compiled: 0 Total compilation time: 107 milliseconds. il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: C:\Users\ashen\Desktop\Unity\2019.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\ashen\AppData\Local\Temp\tmp6228.tmp" -o "C:\Users\ashen\Desktop\Unity\Light The Runes\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_D1942CA11E5E17779331DD5D062164C0\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction -llog -rdynamic -fuse-ld=gold.exe C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:426: error: undefined reference to 'init' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:454: error: undefined reference to 'logout' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:454: error: undefined reference to 'logout' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:464: error: undefined reference to 'activateApp' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:464: error: undefined reference to 'activateApp' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:488: error: undefined reference to 'logPurchase' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:518: error: undefined reference to 'ui' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:540: error: undefined reference to 'initScreenPosition' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:540: error: undefined reference to 'initScreenPosition' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) � Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext) � Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)� il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies) � il2cpp.Program.Run(String[] args, Boolean setInvariantCulture) � il2cpp.Program.Main(String[] args) stderr: ����ࠡ�⠭��� �᪫�祭��: Unity.IL2CPP.Building.BuilderFailedException: C:\Users\ashen\Desktop\Unity\2019.3.13f1\Editor\Data\PlaybackEngines\AndroidPlayer\NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\ashen\AppData\Local\Temp\tmp6228.tmp" -o "C:\Users\ashen\Desktop\Unity\Light The Runes\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_D1942CA11E5E17779331DD5D062164C0\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id -stdlib=libc++ -static-libstdc++ -target armv7-linux-androideabi19 -Wl,--wrap,sigaction -llog -rdynamic -fuse-ld=gold.exe C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:426: error: undefined reference to 'init' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:454: error: undefined reference to 'logout' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:454: error: undefined reference to 'logout' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:464: error: undefined reference to 'activateApp' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:464: error: undefined reference to 'activateApp' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:488: error: undefined reference to 'logPurchase' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:518: error: undefined reference to 'ui' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:540: error: undefined reference to 'initScreenPosition' C:\Users\ashen\Desktop\Unity\Light The Runes\Temp\StagingArea\Il2Cpp\il2cppOutput/Facebook.Unity.Canvas.cpp:540: error: undefined reference to 'initScreenPosition' clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation) � Unity.IL2CPP.Building.CppProgramBuilder.PostprocessObjectFiles(HashSet`1 objectFiles, CppToolChainContext toolChainContext) � Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)� il2cpp.Program.DoRun(String[] args, List`1 foundAssemblies) � il2cpp.Program.Run(String[] args, Boolean setInvariantCulture) � il2cpp.Program.Main(String[] args) UnityEngine.Debug:LogError(Object) UnityEditorInternal.Runner:RunProgram(Program, String, String, String, CompilerOutputParserBase) UnityEditorInternal.Runner:RunManagedProgram(String, String, String, CompilerOutputParserBase, Action`1) UnityEditorInternal.IL2CPPBuilder:RunIl2CppWithArguments(List`1, Action`1, String) UnityEditorInternal.IL2CPPBuilder:ConvertPlayerDlltoCpp(Il2CppBuildPipelineData, String, String, Boolean) UnityEditorInternal.IL2CPPBuilder:Run() UnityEditorInternal.IL2CPPUtils:RunIl2Cpp(String, String, IIl2CppPlatformProvider, Action`1, RuntimeClassRegistry) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) ------------------------------------------------------------------------------------- Exception: C:\Users\ashen\Desktop\Unity\2019.3.13f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe did not run properly! UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <480b5a3bd3214ce5831f6dd8c68fdc55>:0) UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <480b5a3bd3214ce5831f6dd8c68fdc55>:0) UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo, System.String workingDirectory) (at <480b5a3bd3214ce5831f6dd8c68fdc55>:0) UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data, System.String outputDirectory, System.String workingDirectory, System.Boolean platformSupportsManagedDebugging) (at <480b5a3bd3214ce5831f6dd8c68fdc55>:0) UnityEditorInternal.IL2CPPBuilder.Run () (at <480b5a3bd3214ce5831f6dd8c68fdc55>:0) UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <480b5a3bd3214ce5831f6dd8c68fdc55>:0) UnityEditor.Android.PostProcessor.Tasks.RunIl2Cpp.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <3167064085404657b0d6c498207da025>:0) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <3167064085404657b0d6c498207da025>:0) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <3167064085404657b0d6c498207da025>:0) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <3167064085404657b0d6c498207da025>:0) UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <480b5a3bd3214ce5831f6dd8c68fdc55>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) ---------------------------------------------------- UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0 at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0 UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) -------------------------------------------------- Thanks in advance for your help!

how i can share my screenshot in base64 data to facebook using Unity ??

$
0
0
i want to share screenshot to facebook in unity. when i run my app in facebook instant game and try to share a screenshot i get an error "picture should represent a valid url facebook". public void Share() { StartCoroutine(Run()); } IEnumerator Run() { yield return new WaitForEndOfFrame(); Texture2D tex = new Texture2D(Screen.width, Screen.height); tex.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0); tex.Apply(); string link = "data:image/png;base64," + Convert.ToBase64String(tex.EncodeToPNG()); Application.OpenURL(link); Debug.Log(new Uri(link).OriginalString); FB.FeedShare(link: new Uri("https://fb.gg/play/323074382234169"), picture: new Uri(link), ); }

Facebook Deep Link in Unity3D equal to null

$
0
0
Question - why is Facebook Deep Link in Unity3D always null? My colleagues who work in Android Studio have never faced such problems. I think it's just that the Facebook SDK for Unity is made of sticks and crutches, because I haven't been able to achieve absolutely anything with it for two weeks now. This is a complete failure. - Unity Editor Version: `2019.3.0f5` - Unity Facebook SDK Version: `7.21.2` ## The order of my actions: 1) I copied data from Unity to my Facebook app [Screen #1](https://i.stack.imgur.com/06A9p.png) 2) I added the scheme in Facebook settings and regenerate the AndroidManifest [Screen #2](https://i.stack.imgur.com/KvUYz.png) 3) I added this to AndroidManifest because I saw that the unit's Unity help for Deep Links also had it [Screen #3](https://i.stack.imgur.com/9SYAE.png) 4) In my app's Facebook settings, I also enabled Deep Linking [Screen #4](https://i.stack.imgur.com/CCI08.png) 5) My code: ` void Awake() { if (FB.IsInitialized) FB.ActivateApp(); else { FB.Init(() => { FB.ActivateApp(); }); } } public void Click() { FB.Mobile.FetchDeferredAppLinkData(DeepLinkCallback); } void DeepLinkCallback(IAppLinkResult result) { if (!string.IsNullOrEmpty(result.Url)) { _floats.DeepLink = result.Url; // Deep Link = null (????????????) Debug.Log("Deep Link: " + _floats.DeepLink); } SceneManager.LoadScene(2); } void Update() { DontDestroyOnLoad(this); } ` 6) I tested Deep Link with Facebook Deep Link Tester. Deep Link looked something like this: ` SS://testDeep ` 7) Facebook recorded the following a Deep Link, albeit not without some imaginary mistakes [Screen #5](https://i.stack.imgur.com/4H9zp.png) [Screen #6](https://i.stack.imgur.com/ztHSC.png) 8) BUT as a result, the DeepLink variable was still empty. There was nothing there. Null. But in the editor, the variable was not empty: [Screen #7](https://i.stack.imgur.com/vGdfr.png) 9) Removing scheme from AndroidManifest and Facebook settings didn't help me either. Also, I tried enabling "Native or desktop app?" in the Facebook app settings, but it was also useless

ClassNotFound Exception when trying to run ads with Audience Network manager

$
0
0
I'm a contractor looking to run advertisements with Facebook Audience Network, i understand the ads won't run in editor, but every time i build it i recieve this error, from what i can tell the thing comes with a dependancy manager, but I can't for the life of me figure out what I need to fix to get these to run. ---------- This is the debug error that's coming up whenever i try to run LoadInterstitial(), which is happening on application start up for testing purposes; AndroidPlayer(samsung_SM-G950W@192.168.0.225) AndroidJavaException: java.lang.ClassNotFoundException: com.facebook.ads.AudienceNetworkAds java.lang.ClassNotFoundException: com.facebook.ads.AudienceNetworkAds at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:453) at com.unity3d.player.UnityPlayer.nativeRender(Native Method) at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:83) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:214) at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.ads.AudienceNetworkAds" on path: DexPathList[[zip file "/data/app/com.DefaultCompany.CleaningService-t9FZdaC2pyZn5zoamD2_FA==/base.apk"],nativeLibraryDirectories=[/data/app/com.DefaultCompany.CleaningService-t9FZdaC2pyZn5zoamD2_FA==/lib/arm, /data/app/com.DefaultCompany.CleaningService-t9FZdaC2pyZn5zoamD2_FA==/base.apk!/lib/armeabi-v7a, /system/lib, /system/vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) at java.lang.ClassLoader.loadClass(ClassLoader.java:379) at java.lang.ClassLoader.loadClass(ClassLoader.java:312) ... 8 more at UnityEngine.AndroidJNISafe.CheckException () [0x0008d] in /Users/builduser/buildslave/unity/build/Modules/AndroidJNI/AndroidJNISafe.cs:24 at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x0000c] in /Users/builduser/buildslave/unity/build/Modules/AndroidJNI/AndroidJNISafe.cs:107 at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00013] in /Users/builduser/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:789 at UnityEngine.AndroidJavaClass..ctor (System.String className) [0x00008] in /Users/builduser/buildslave/unity/build/Modules/AndroidJNI/AndroidJava.cs:783 at AudienceNetwork.AudienceNetworkAds.IsInitialized () [0x00029] in D:\Projects\Github\CleaningService\Assets\Facebook\AudienceNetwork\Library\AudienceNetworkAds.cs:35 at AudienceNetwork.AudienceNetworkAds.Initialize () [0x00001] in D:\Projects\Github\CleaningService\Assets\Facebook\AudienceNetwork\Library\AudienceNetworkAds.cs:15 at AudienceNetwork.InterstitialAd..ctor (System.String placementId) [0x00008] in D:\Projects\Github\CleaningService\Assets\Facebook\AudienceNetwork\Library\InterstitialAd.cs:124 at InterstitialAdScene.LoadInterstitial () [0x00012] in D:\Projects\Github\CleaningService\Assets\Facebook\AudienceNetwork\Scenes\Interstitial\InterstitialAdScene.cs:31 at UIManager.Start () [0x0001c] in D:\Projects\Github\CleaningService\Assets\Scripts\UIManager.cs:47 (Filename: /Users/builduser/buildslave/unity/build/Modules/AndroidJNI/AndroidJNISafe.cs Line: 24) It's coming up every time i hit load ad, and though i'm calling the load function from my personal UI Manager script, all code is taken from the Interstitial Sample Scene provided with the package, which hasn't been changed from import aside from providing the ID for the specfic advertisement i'm trying to get it to run. ---------- any help sorting out how to work the dependancy manager, or what files i need to move where to make this work would be very much appreciated, thank you!

Facebook SDK login problem on Android

$
0
0
Hi, i have integrated the Facebook SDK to my android app and use it to login. Everything works fine. But as soon as the facebook-app is installed on the same device and the user is logged in the facebook app, my app skips the login screen and automatically logs in to the same account. Trying and trying to force the login screen anyhow to be shown in that case, but seems not possible?! Has anybody an idea? btw: I'm using SDK version 8.1.0 and Unity 2019.4.11, but also had no luck with other 7.x.x versions of the SDK...
Viewing all 786 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>