The code you have given should only access the default photo. Also, you should be appending the contact ID to that URI, not the photo ID (assuming you're using the photo's id from the data table).
If there are multiple photos you might want to try accessing them directly from the Data table. You'll need to parse a database cursor and convert the raw byte data into a bitmap manually as shown below:
String[] projection = {ContactsContract.CommonDataKinds.Photo.PHOTO};
Uri uri = Uri. ContactsContract.Data.CONTENT_URI;
String where = ContactsContract.Data.MIMETYPE
+ "=" + ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE + " AND "
+ ContactsContract.Data.CONTACT_ID + " = " + mContactId;
Cursor cursor = context.getContentResolver().query(uri, projection, null, null, null);
if(cursor!=null&&cursor.moveToFirst()){
do{
byte[] photoData = photoCursor.getBlob(0);
Bitmap photo = BitmapFactory.decodeByteArray(photoData, 0,
photoData.length, null);
//Do whatever with your photo here...
}while(cursor.moveToNext());
}
You would want mContactId to correspond with the contact that you want photos for.
If you want to limit to only facebook photos, you'll need to use ContactsContract.Data.RAW_CONTACT_ID instead, which you should get from the RawContacts table using your contact Id and a filter based on the facebook account (assuming you know what account you're looking for... that can vary by sync provider implementation...)