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 #1028

Closed
5 tasks done
iliaskomp opened this issue Dec 14, 2021 · 5 comments
Closed
5 tasks done

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

iliaskomp opened this issue Dec 14, 2021 · 5 comments

Comments

@iliaskomp
Copy link

iliaskomp commented Dec 14, 2021

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

Installation platform & version

Gradle 7.1

Package

Share

Goals

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

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 this reported issue 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 mentioned above
  • 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>
@linmx0130
Copy link

Hi @iliaskomp! Thanks for raising the issue! It looks like the stacktrace is obfuscated so we cannot get useful information from the tracelog.

Could you share us with the Facebook App version number you're using for the test so that we can be easier to reproduce the bug.

@iliaskomp
Copy link
Author

Facebook version: 348.0.0.39.118

@github-actions
Copy link

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Mar 28, 2022
@github-actions
Copy link

github-actions bot commented Apr 4, 2022

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@github-actions github-actions bot closed this as completed Apr 4, 2022
@MrAugMyo
Copy link

MrAugMyo commented Apr 4, 2022

www.facebook.com/aungmyo.website

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