facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 906 forks source link

Expose API for CCPA compliance and iOS 14 ATE #804

Closed dreamolight closed 4 years ago

dreamolight commented 4 years ago

What is this commit about:

Test Plan:

  1. Create sample project
  2. Integrate the SDK
  3. Add below code to verify the new API works
    <Button
            title="ATE"
            onPress={() =>
            Settings.setAdvertiserTrackingEnabled(true).then( (result) => {
              console.log("is success: " + result);
              Settings.getAdvertiserTrackingEnabled().then((result) => {
                console.log("ATE: " + result);
                Settings.setAdvertiserTrackingEnabled(false).then( (result) => {
                console.log("is success: " + result);
                Settings.getAdvertiserTrackingEnabled().then((result) => {
                  console.log("ATE: " + result)
                });
              })
              });
            })
          }/>
          <Button
            title="DPO"
            onPress={() =>
            Settings.setDataProcessingOptions(["a", "b"])
          }/>
janicduplessis commented 4 years ago

Can you also run pod install in the example project, it should fix the CI error https://github.com/facebook/react-native-fbsdk/pull/804/checks?check_run_id=1355282567

dreamolight commented 4 years ago

Will address comments and update the PR.

Stafox commented 4 years ago

Without this PR there is no possibility to promote an app on facebook for ios14. Any thoughts when it can be merged?

dreamolight commented 4 years ago

Hi @janicduplessis , could you review again and let me know if further change needed?

mikehardy commented 4 years ago

Nice! @janicduplessis + @dreamolight --> :trophy:

eladgel commented 4 years ago

@mikehardy can this be used by changing the package.json to work with master? or should we wait for an official release?

mikehardy commented 4 years ago

@mikehardy can this be used by changing the package.json to work with master? or should we wait for an official release?

Pretty sure we need a release or you need to craft patch-package compatible patches

eladgel commented 4 years ago

Thank you!

janicduplessis commented 4 years ago

I just published 3.0.0

dreamolight commented 4 years ago

Thanks @janicduplessis, that's really nice! Also thanks @mikehardy for pointing out the latest iOS version!

sbarbour-93 commented 4 years ago

Could someone on this thread clarify if these changes have resolved issue #799? I've just upgraded to 3.0.0 and tested with my Android app, the FB profile picture (which now requires the access token as part of the request) is still defaulting to the silhouette for me. Just want to be sure I'm not missing something before I continue to look into this.

Stafox commented 4 years ago

Could someone on this thread clarify if these changes have resolved issue #799? I've just upgraded to 3.0.0 and tested with my Android app, the FB profile picture (which now requires the access token as part of the request) is still defaulting to the silhouette for me. Just want to be sure I'm not missing something before I continue to look into this.

As you can see this PR provides integration with FB SDK >= 7.1 for Android. Make sure you've FB SDK 8.x installed as dependency.

sbarbour-93 commented 3 years ago

Could someone on this thread clarify if these changes have resolved issue #799? I've just upgraded to 3.0.0 and tested with my Android app, the FB profile picture (which now requires the access token as part of the request) is still defaulting to the silhouette for me. Just want to be sure I'm not missing something before I continue to look into this.

As you can see this PR provides integration with FB SDK >= 7.1 for Android. Make sure you've FB SDK 8.x installed as dependency.

Yeah i've done this. It's pulling in 8.0.0 on Android and i'm still seeing the default silhouette instead of the user's profile picture. Is there any reference as to how we should pass the access token in our login request using this lib so that the user's profile picture is returned as it was prior to these updates from FB on how the profile picture is requested?

Stafox commented 3 years ago

have no ideas. Will be more effective to create an issue in android sdk https://github.com/facebook/facebook-android-sdk.

sbarbour-93 commented 3 years ago

I've tried this on the iOS platform and have the same issue. I'm assuming the access token isn't being passed into configuration of the native library which is resulting in the default silhouette being returned. Would you rather I raise a separate issue for this?