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

Sharing a link to facebook doesn't work on certain devices #1066

Open
5 tasks done
iliaskomp opened this issue Apr 29, 2022 · 7 comments
Open
5 tasks done

Sharing a link to facebook doesn't work on certain devices #1066

iliaskomp opened this issue Apr 29, 2022 · 7 comments

Comments

@iliaskomp
Copy link

iliaskomp commented Apr 29, 2022

Checklist before submitting a bug report

Java version

11

Android version

Android 9, Android 11

Android SDK version

11.3.0, 12.1.0, 12.2.0, 13.1.0

Installation platform & version

Gradle 7.1

Package

Share

Goals

The goal is that a user is able to share links to the facebook app.

Affected devices
Xiaomi Mi A1 - Android 9.0
Samsung S21 Ultra - Android 11.0

Info
We noticed that in certain devices a user is not able to share a link to the facebook app with the android facebook sdk's ShareDialog.show(...). In most devices with the same exact code the result is successful.

We have verified the issue with both the production app and with a minimal sample app on the affected devices.

Stacktrace
Application id has been redacted and replaced with "applicationid"

 W/fb4a.BlueServiceQueue: Exception during service
    X.2kq: [code] 100 [message]: Unsupported get request. Object with ID '<applicationid>' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api [extra]: 
        at X.1hl.A03(Unknown Source:78)
        at X.1hl.A06(Unknown Source:13)
        at X.1hl.A02(Unknown Source:20)
        at X.1hl.A07(Unknown Source:24)
        at X.3uj.A00(Unknown Source:4)
        at X.3ua.handleResponse(Unknown Source:130)
        at X.3Bf.A06(Unknown Source:14)
        at X.3Ee.run(Unknown Source:52)
        at X.14Q.run(Unknown Source:2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at X.14V.run(Unknown Source:3)
        at X.14W.run(Unknown Source:14)
        at java.lang.Thread.run(Thread.java:764)

Already reported issue
The issue seems to be the same as facebookarchive/react-native-fbsdk#828 from the react-native-fbsdk archive which has no resolution.
When the user is logged out on the affected devices, the sharing functionality works.
When the user is logged in, the sharing functionality doesn't work.

Expected results

When user clicks the "share on facebook" button, the facebook app successfully opens so that the user can share their link.

Actual results

When user clicks the "share on facebook" button, the facebook app does not open. There is a flickering of a window trying to open but is immediately shut down again.

Steps to reproduce

Prerequisites

  • Use an affected device (Xiaomi Mi A1 - Android 9.0, Samsung S21 Ultra - Android 11.0)
  • Have facebook app installed on the device and a user logged in

Steps

  • Click a button that triggers sharing a link to the facebook app using ShareDialog.show(...)

Code samples & details

From the minimal sample app:

app build.gradle ----
implementation 'com.facebook.android:facebook-share:12.2.0'

Activity -----

        binding.facebookButton.setOnClickListener {
            FacebookSdk.setApplicationId("<valid id>")
            FacebookSdk.setClientToken("<valid client token>")
            FacebookSdk.sdkInitialize(this.applicationContext) // this is used for brevity but in the actual app the facebook sdk initialization is implicitly done through AndroidManifest
            val content: ShareLinkContent = ShareLinkContent.Builder()
                .setContentUrl(Uri.parse("http://www.google.com"))
                .build()
            ShareDialog.show(this, content)
        }

Queries in AndroidManifest ----
    <queries>
        <package android:name="com.facebook.orca" />
        <package android:name="com.facebook.katana" />
        <package android:name="com.facebook.android" />
        <provider android:authorities="com.facebook.katana.provider.PlatformProvider" />
        <provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
    </queries>
@iliaskomp
Copy link
Author

This is a duplicate of #1028 which was closed as stale. However, the issue is persisting with later facebook sdk versions

@iliaskomp
Copy link
Author

iliaskomp commented May 23, 2022

Facebook is losing traffic due to this bug, is there any update?

@angiep125
Copy link

I cannot reproduce this issue on my own test devices. Requesting one of the above mentioned.

@iliaskomp
Copy link
Author

Indeed, the issue is not happening for all devices but for the specific ones mentioned above

@iliaskomp
Copy link
Author

The issue is still happening on specific devices and facebook is losing traffic due to that, any updates?

@iliaskomp
Copy link
Author

Any updates on this issue?

@QiYi627
Copy link

QiYi627 commented Nov 26, 2024

same issue

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

3 participants