2

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);
}
Sami
  • 278
  • 1
  • 4
  • 9

3 Answers3

5

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>
Community
  • 1
  • 1
Owain van Brakel
  • 2,741
  • 1
  • 11
  • 20
  • And are you sure the other 3 point on the list are not causing it? – Owain van Brakel Sep 06 '14 at 19:24
  • I have the same issue... Checked all 4 points multiple times... I'm trying to get the new Facebook Like Button to work... – Aviel Gross Oct 30 '14 at 14:19
  • 3
    If Facebook app not available in your device/emulator then this issue occur."Failed to find provider info for com.facebook.katana.provider.PlatformProvider", Please install Facebook app from GooglePlay or download apk from facebook developer account for emulator. :) – Ranjit Chandel Dec 17 '14 at 12:48
  • The thing for me is facebook login (which is what I am implementing) works, but yet I get these errors in my Log – Chintan Shah Mar 14 '15 at 14:31
3

I noticed that these logcat errors:

...
E/ActivityThread﹕ Failed to find provider info for com.facebook.katana.provider.PlatformProvider
E/ActivityThread﹕ Failed to find provider info for com.facebook.wakizashi.provider.PlatformProvider
...

appear only if you do not have the Facebook APK installed on your emulator. After you install the FB APP app like this:

Macintosh:platform-tools admin$ ./adb install ~/Downloads/Facebook-[Version Number].apk 
758 KB/s (40857788 bytes in 52.574s)
        pkg: /data/local/tmp/Facebook-32.0.0.23.15.apk
Success

These type of errors should disappear.

Good luck !

Stefan Ciprian Hotoleanu
  • 1,872
  • 1
  • 19
  • 26
1

I have the same problem, I noted that the problem is linked to the Facebook app, isn't installed on emulator or device.