Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different performance when share the same link by web or native handler. #1232

Open
5 tasks done
lsvery666 opened this issue Feb 2, 2024 · 0 comments
Open
5 tasks done

Comments

@lsvery666
Copy link

lsvery666 commented Feb 2, 2024

Checklist before submitting a bug report

Java version

11

Android version

Android 12

Android SDK version

15.2.0

Installation platform & version

Gradle 6.7.1

Package

Share

Goals

I just share the same link using Facebook Android SDK in different way. While Facebook is installed, SDK will use native handler to share the link. While Facebook is uninstalled, SDK will use web handler to share the link.
But I get different performance when I click the links in Facebook app. For the native share link, it opens the corresponding url in a web view activity for me. After I click the bottom button, it opens CapCut app for me. While for the web share link, it directly opens the CapCut app.

20240202-180636.mp4

Expected results

How could this happen? What can I do if I want to get the same performance as the native share link?

Actual results

I get different performance when I click the links in Facebook app. For the native share link, it opens this link in a web view activity for me. While for the web share link, it directly opens the CapCut app.

Steps to reproduce

No response

Code samples & details

// INSERT YOUR CODE HERE
val content = ShareLinkContent.Builder()
    .setContentUrl(Uri.parse(url))
    .setShareHashtag(ShareHashtag.Builder().setHashtag(text).build())
    .build()
val callbackManager = CallbackManager.Factory.create()
val callback = object : FacebookCallback<Sharer.Result> {
    override fun onSuccess(result: Sharer.Result) {
    }

    override fun onCancel() {
    }

    override fun onError(error: FacebookException) {
    }
}
val shareDialog = ShareDialog(activity)
shareDialog.registerCallback(callbackManager, callback)
if (shareDialog.canShow(content)) {
    shareDialog.show(content)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant