Android : Failed to find provider info for com.facebook.wakizashi.provider.PlatformProvider

Sami picture Sami · Sep 6, 2014 · Viewed 13.8k times · Source

I am stuck for days now. I am using the PhotoShareDialogBuilder in facebook. I used the content provider something like this :

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

But, it gives me the error whenever the code gets executed. Someone please help me out. I don't want to use any other api like simple facebook etc. The error i receive in the logcat is : 09-06 13:56:14.575: E/ActivityThread(4202): Failed to find provider info for com.facebook.wakizashi.provider.PlatformProvider.

My code :

 boolean canPresentShareDialogWithPhotos = FacebookDialog.canPresentShareDialog(this,
                        FacebookDialog.ShareDialogFeature.PHOTOS);


                if (canPresentShareDialogWithPhotos) {
                    FacebookDialog shareDialog = createShareDialogBuilderForPhoto(image).build();
                    uiHelper.trackPendingDialogCall(shareDialog.present());
                }  

private FacebookDialog.PhotoShareDialogBuilder createShareDialogBuilderForPhoto(Bitmap... photos) {
    return new FacebookDialog.PhotoShareDialogBuilder(this)
            .addPhotos(image);
}

Answer

Owain van Brakel picture Owain van Brakel · Sep 6, 2014

This can be caused by:

  1. No internet connection
  2. Make sure you've added the internet permission to the manifest
  3. The hashkey is wrong for the app
  4. Your app id is wrong

My guess would be point 2

you probably need to add this to you AndroidManifest.xml

<uses-permission android:name="android.permission.INTERNET"></uses-permission>