facebook / facebook-android-sdk

Used to integrate Android apps with Facebook Platform.
https://developers.facebook.com/docs/android
Other
6.17k stars 3.66k forks source link

Use CustomTabActivity to open Fallback Feed Link to fix Embedded WebView Error #1235

Open chrisgradl opened 9 months ago

chrisgradl commented 9 months ago

Checklist before submitting a bug report

Java version

17.0.9

Android version

Android 10

Android SDK version

33

Installation platform & version

Gradle

Package

Share

Goals

Users of my App should be able to Share Link on Facebook

Expected results

when calling ShareDialog.open and the Facebook App is not installed, i expect the Fallback Feed Url to be opened in a Chrome Custom Tab so all users can login

Actual results

The Fallback is opened in the Embedded WebView and some users can not login

Screenshot_20240221-094526 (1)

Steps to reproduce

No response

Code samples & details

// INSERT YOUR CODE HERE
george5613 commented 9 months ago

I also have this problem in App share logic. SDK version 16.3.0 . When in another logic of login for user info , it succeed when register CustomTabActivity or with an out app browser callback, but when calling ShareDialog.show it invoke inner webview login and cause error. I have Finding the deprecating-webviews so it seems a bug case now, the correct case should be a login invoke in outside browser app or invoke the CustomTabActivity login case.