facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
489 stars 256 forks source link

FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized. #480

Open dletozeun opened 4 years ago

dletozeun commented 4 years ago

Hello,

Environment

In order to prevent the SDK to send any data before user content, the following have been set in XCode Info.plist file:

Issue

Without user consent the SDK remains disabled but still seems to attempt to perform a network request as this line appears twice one after the other in the app log on app start:

FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized.

After getting user consent, the FB SDK is initialized on run time with FB.Init and Advertiser ID collection enabled through Unity FB class. However the same line:

FBSDKLog: FBSDKGraphRequestConnection cannot be started before Facebook SDK initialized.

now floods the console frequently by waves making it difficult to track anything else in the console.

Any idea of how to disable this? It seems FBSDKGraphRequestConnection shouldn't start anyway before the SDK is initialized.

Any help would be greatly appreciated!

luaye commented 3 years ago

I would also like a fix or improvement for this. We just want to disable all communication before the player accept the GDPR screen. We tried setting the flags off (such as FacebookAutoInitEnabled) but it still send url requests.

We followed the guidelines from https://developers.facebook.com/docs/app-events/gdpr-compliance/ but I think this only applies to non-Unity SDK as I don't not see any bit of code that has the text "FacebookAutoInitEnabled" in sdk.