Failed to find provider information for com.facebook.katana.provider.AttributionIdProvider

Does anyone know what this error means? I get it in the LogCat shell every time I connect to my Android app on Facebook (via emulator).

Code that is responsible for administrator privileges:

@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.authorize); mPrefs = getPreferences(MODE_PRIVATE); loginPref = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); String access_token = mPrefs.getString("access_token", null); long expires = mPrefs.getLong("access_expires", 0); if(access_token != null) { Singelton.mFacebook.setAccessToken(access_token); } if(expires != 0) { Singelton.mFacebook.setAccessExpires(expires); } Singelton.mFacebook.authorize(this, new String[] {"email","user_birthday"}, new DialogListener() { @Override public void onComplete(Bundle values) { SharedPreferences.Editor editor = mPrefs.edit(); editor.putString("access_token", Singelton.mFacebook.getAccessToken()); editor.putLong("access_expires", Singelton.mFacebook.getAccessExpires()); editor.commit(); SharedPreferences.Editor logEditor = loginPref.edit(); logEditor.putBoolean("login", true); logEditor.commit(); addUser(); } @Override public void onFacebookError(FacebookError error) { errorHandler(); } @Override public void onError(DialogError e) { errorHandler(); } @Override public void onCancel() { Log.d("MyApp", "Facebook cancel"); } }); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); Singelton.mFacebook.authorizeCallback(requestCode, resultCode, data); } 
+46
android login facebook logcat
01 Oct '12 at 8:45
source share
7 answers

This can happen for the following reasons:

  • You are not connected to the Internet
  • You have not received permission to access the Internet (Manifest.xml)
  • You did not use the correct hashkey for the application
  • You did not provide a valid application id
+54
Nov 21 '12 at 11:10
source share

It just means that you don’t have the Facebook application installed on your phone. Do not worry about him too much.

How the Android SDK for Android works, every time you need to make a request to Facebook, the SDK checks if the Facebook application is installed on your device. If it is installed, the request is executed through the application. If the application is not installed, it retrieves the data on its own.

+37
Oct 01
source share

If any problem has not been resolved by four solutions, this may help. I was getting the same error when I started using Snippets to implement Facebook login. I used the standard fragment, not the v4 Fragments support library, and after switching to the Fragment support library my problem disappeared. This may be unique to my situation, but I thought I would share it just in case. Also remember to set the snippet if you use the login button method.

 myFacebookLoginButton.setFragment(this); //Assuming you're in a Fragment class 
+4
May 20, '15 at 3:05
source share

Just add the following permission to AndroidManifest.xml

 <uses-permission android:name="android.permission.SET_DEBUG_APP"/> 
+3
Jan 05 '13 at 16:22
source share

As @ Vinay-S-Shenoy said, this happens when the Facebook application is not installed on the phone or simulator. What I am doing to avoid this error is to check if the Facebook application is installed before calling the facebook.authorize method, and if the facebook application is not installed, I am warning this message to the user.

 public boolean isFacebookAvailable() { Intent intent = new Intent(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_TEXT, "Test; please ignore"); intent.setType("text/plain"); final PackageManager pm = this.getApplicationContext().getPackageManager(); for(ResolveInfo resolveInfo: pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY)){ ActivityInfo activity = resolveInfo.activityInfo; // Log.i("actividad ->", activity.name); if (activity.name.contains("com.facebook.katana")) { return true; } } return false; } 
+1
Mar 06 '13 at 17:00
source share

Remember to override onActivityResult and check if it called (e.g. if you use fragments)

PS (maybe it will be useful for others, I ran into this problem when using parse facebook login =)

+1
Dec 17 '14 at 10:00
source share
 btnFb_photo_post.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // postPhotoToWall(facebook.getAccessToken()); facebook.authorize(MyFBTestActivity.this, new String[] { "publish_stream" }, new DialogListener() { @Override public void onFacebookError(FacebookError e) { // TODO Auto-generated method stub Toast.makeText(getApplicationContext(), e.getMessage(), Toast.LENGTH_LONG).show(); } @Override public void onError(DialogError dialogError) { // TODO Auto-generated method stub Toast.makeText(getApplicationContext(), dialogError.getMessage(), Toast.LENGTH_LONG).show(); } @Override public void onComplete(Bundle values) { postToWall(values.getString(Facebook.TOKEN)); } private void postToWall(String accessToken) { // Toast.makeText(getApplicationContext(), // "trying", Toast.LENGTH_LONG).show(); byte[] data = null; Bitmap bi = BitmapFactory.decodeResource( getResources(), R.drawable.ic_launcher ); ByteArrayOutputStream baos = new ByteArrayOutputStream(); bi.compress(Bitmap.CompressFormat.JPEG, 100, baos); data = baos.toByteArray(); Bundle params = new Bundle(); // if (facebook.getAccessToken() != null) params.putString(Facebook.TOKEN, facebook.getAccessToken() ); params.putString("method", "photos.upload"); params.putString("caption", "www.samplelink.com"); // params.putString("message", // "www.google.com"); params.putByteArray("picture", data); AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook); mAsyncRunner.request(null, params, "POST", new SampleUploadListener(), null); } @Override public void onCancel() { // TODO Auto-generated method stub } } ); } }); 

I use this code to upload an image to an FB wall. try once

-7
01 Oct '12 at 12:00
source share



All Articles