[英]Share Dialog (PHOTO) of Facebook SDK is not working
i tried the following code 我尝试了以下代码
List<File> list = new ArrayList<File>();
list.add(new File(uri.getPath()));
boolean canPresentShareDialogWithPhotos = FacebookDialog.canPresentShareDialog(mContext, FacebookDialog.ShareDialogFeature.PHOTOS);
Log.d(TAG, "canPresentShareDialogWithPhotos: " + canPresentShareDialogWithPhotos);
if (canPresentShareDialogWithPhotos) {
// Publish the post using the Photo Share Dialog
FacebookDialog shareDialog = new FacebookDialog.PhotoShareDialogBuilder((Activity) mContext)
.addPhotoFiles(list)
.build();
shareDialog.present();
} else {}
i am getting canPresentShareDialogWithPhotos value true 我正在获取canPresentShareDialogWithPhotos值true
Check your manifest 检查您的清单
<provider
android:name="com.facebook.NativeAppCallContentProvider"
android:authorities="com.facebook.app.NativeAppCallContentProvider1576508475912674"
android:exported="true" />
replace "1576508475912674" by your fbID 用您的fbID替换“ 1576508475912674”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.