dimanche 1 mars 2015

FacebookDialog.canPresentShareDialog is always null

I`m trying to take a picture and share to on facebook.



> private void facebookPublishFeedDialog(Bitmap bitmap2) {
> images.add(bitmap2); if (FacebookDialog.canPresentShareDialog
> (getActivity(),
> FacebookDialog.ShareDialogFeature.PHOTOS)) {
> // Publish the post using the Photo Share Dialog
> FacebookDialog shareDialog = new FacebookDialog.PhotoShareDialogBuilder(getActivity())
> .addPhotos(images)
> .build();
>
> }
> }


Crashes when trying to get canPresentShareDialog. My SDK version is 3.23 I already added that to my manifest:



<provider
android:name="com.facebook.NativeAppCallContentProvider"
android:authorities="com.facebook.app.NativeAppCallContentProvider11111**
android:exported="true" />


Thanks


Aucun commentaire:

Enregistrer un commentaire