I am sharing image stories to Facebook using "Sharing to Stories for Android Developer" and Getting error when i am sharing image :
Error : facebook cannot access this media at the moment. please try again later (last image please check)
https://developers.facebook.com/docs/sharing/sharing-to-stories/android-developers
add dependencies
implementation 'com.facebook.android:facebook-share:15.1.0'
implementation 'com.facebook.android:facebook-login:15.1.0'
MainActivity: pickImage from gallery on ClickButton using function.
MainActivity: onActivityResult function.
MainActivity: shareData function.
Result: In bottom of image as Toast.
Kindly help me out! Thanks
I got a solution for this:
pass the Uri from onActivityResult like this: shareData(selectedImageUri); and use in shareData modified line this: intent.setDataAndType(uri, "image/jpeg");
If any queries regarding sharing posts/stories/feeds on facebook/instagram/tweeter ping me.