Brefore 사용자 로그인이 코드 : 에러의FB.PublishInstall() 안드로이드
FB.Init(() =>
{
FB.PublishInstall();
});
결과 :
:03-14 10:55:01.241: I/Unity(6662): (Filename: ./Runtime/ExportGenerated/AndroidManaged/UnityEngineDebug.cpp Line: 54)
03-14 10:55:01.326: I/Unity(6662): Exception: java.lang.ExceptionInInitializerError
03-14 10:55:01.326: I/Unity(6662): at UnityEngine.AndroidJNISafe.CheckException() [0x00000] in <filename unknown>:0
03-14 10:55:01.326: I/Unity(6662): at UnityEngine.AndroidJNISafe.CallStaticVoidMethod (IntPtr clazz, IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in <filename unknown>:0
03-14 10:55:01.326: I/Unity(6662): at UnityEngine.AndroidJavaObject._CallStatic (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
03-14 10:55:01.326: I/Unity(6662): at UnityEngine.AndroidJavaObject.CallStatic (System.String methodName, System.Object[] args) [0x00000] in <filename unknown>:0
03-14 10:55:01.326: I/Unity(6662): at Facebook.AndroidFacebook.CallFB (System.String method, System.String args) [0x00000] in <filename unknown>:0
03-14 10:55:01.326: I/Unity(6662): at Facebook.AndroidFacebook.PublishInstall (System.String appId, Facebook.FacebookDelegate callback) [0x00000] in <filename unknown>:0
03-14 10:55:01.326: I/Unity(6662): at FB.PublishInstall (Facebook.FacebookDelegate callback) [0x00000] in <filename unknown>:0
03-14 10:55:01.326: I/Unity(6662): at PublishInstallController.<PublishInstall>m__87() [0x00000] in <filename unknown>:0
03-14 10:55:01.326: I/Unity(6662): at Facebook.AndroidFacebook.OnInitComplete
사용자가이 코드를 실행하기 이전에 로그인되어 있으면
모든 것이 잘됩니다.
documentation는 (2 단계 : 페이스 북 SDK 추가)를 말한다 :
After installing the SDK, include the following code to be executed when your app is in the foreground. This will allow the app to ping back the install event to Facebook when the user opens up the app for the first time, and again in the future if there is a network error. Our client code will stop sending installs once it acquires a success code from the server, and our back-end will only count the install a single time if it receives multiple hits for the same device:
질문 :
- 난 당신이 사용자 전에 FB.PublishInstall() 를 호출 할 수있는 제대로 이해 했나 페이스 북에서의인가?
- 이 오류를 해결할 가능성이 있습니까?