在Android上:获取联系人列表时无法检索Facebook联系人 [英] On android : Cannot retrieve facebook contacts when fetching contact list

查看:119
本文介绍了在Android上:获取联系人列表时无法检索Facebook联系人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序将手机通讯录以vcf格式导出到SD卡。



我可以使用Uri ContactsContract.Data获取联系人。 CONTENT_URI,但我无法检索Facebook联系人(图片,电子邮件,facebookID ....)我上网并没有找到任何有用的解决方案。



那么任何想法如何让Facebook联系?有些人在谈论sql注入没有任何有用的代码/解决方案。



我使用以下代码:

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:

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();
}

推荐答案

这篇关于在Android上:获取联系人列表时无法检索Facebook联系人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆