facebook-android-sdk
                                
                                 facebook-android-sdk copied to clipboard
                                
                                    facebook-android-sdk copied to clipboard
                            
                            
                            
                        ShareDialog.canShow() == fasle although facebook is already installed
Checklist before submitting a bug report
- [X] I've updated to the latest released version of the SDK
- [X] I've searched for existing Github issues
- [X] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [X] I've read the Code of Conduct
- [X] This issue is not security related and can safely be disclosed publicly on GitHub
Java version
1.7
Android version
API 30, Android 11
Android SDK version
12.0.0
Installation platform & version
gradle: 3.3.3, Android Studio 4.0.1
Package
Share
Goals
I want to know if this is normal or abnormal, and if so, how to fix it
Expected results
If facebook is installed, then ShareDialog.canShow() should return true, and when I call ShareDialog.show() can normally jump to facebook to share the picture content
Actual results
If facebook is started, it can be shared normally, but if the process is actively exited by the user, ShareDialog.canShow() will return false and then you cannot jump to facebook to share.
Steps to reproduce
- start facebook
- exit it from the taskbar
- start game and click the share bottom,This step will call the ShareDialog.canShow() of the facebook SDK and return false.
Code samples & details
// INSERT YOUR CODE HERE
if (shareDialog.canShow(shareContent)) {
   shareDialog.registerCallback(mCallbackManager, facebookCallback);
   shareDialog.show(shareContent);
} else {
   Log.e(TAG, "share failed");
}