Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have an application that export the phone contacts to the sdcard in a vcf format.

I am able to fetch the contacts using the Uri ContactsContract.Data.CONTENT_URI, but I cannot retrieve Facebook contacts(images, email, facebookID....) I've surfed the web and didn't find any useful solution.

So any idea how to get Facebook contact ? Some people are talking about sql injection without any useful code/solution.

I am using the below code:
Java
try {
    Uri uri = ContactsContract.Data.CONTENT_URI; // all contacts (without fb)
    Cursor c = mcontext.getContentResolver().query(uri, null,null, null, null);
    while (c.moveToNext()) {
        ..............
    }
} catch (Exception e) {
    e.printStackTrace();
}
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900