1

I have used cursor for getting all contacts from android contact list as :

ContentResolver cr = getContentResolver();
    Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null);

    if (cur.getCount() > 0) {
      while (cur.moveToNext()) {
        String id = cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
        String name = cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
        if (Integer.parseInt(cur.getString(cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
          Cursor pCur = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ?", new String[] { id }, null);
          while (pCur.moveToNext()) {
            phoneContactList.add(name);
            Log.i("Contact List", name);
          }
          pCur.close();
        }
      }

My contact list is in sync with facebook. But in the contact list I am not getting contacts from facebook.

How can I get all sync contacts..?

Naresh J
  • 2,087
  • 5
  • 26
  • 39
  • possible duplicate of [Android and Facebook Contact Picker Issuer](http://stackoverflow.com/questions/8138032/android-and-facebook-contact-picker-issuer) – thepoosh Jul 22 '13 at 06:02

1 Answers1

0

just in case someone stumbles upon this, the answer is here:

https://stackoverflow.com/a/8138587/669180

"Facebook is not included in the ContactPicker because Facebook forbid that."

Community
  • 1
  • 1
Steelight
  • 3,347
  • 1
  • 20
  • 17