在Android的Facebook好友生日好友、生日、Android、Facebook

2023-09-12 07:46:38 作者:面具

在Android中,有什么是让那些朋友的生日最简单的方法?或关系状态?使用FQL或通过Facebook的API,SDK为Android?

提出请求

感谢。

解决方案

 捆绑PARAMS =新包();
 params.putString(域,生日);
 JSONObject的jObject1 =新的JSONObject(authenticatedFacebook.request(我的/朋友,则params));
 

现在,如果你打印jobject1你会得到你所有的朋友的生日列表。

的响应将是JSON格式,你必须从它那里得到的价值。

authenticatedFacebook是你对象为Facebook。

有关进一步说明您在本链接检查.....

 私有静态最后的String [] PERMISSIONS =
    新的String [] {friends_birthday,read_stream,offline_access};
 
Facebook宣布支持在Android上使用Tor访问

请确保你给的权限访问朋友的生日日期。

in Android, what is the easiest way to get ones Friend's birthdays? Or relationship status? Using FQL or by requesting it via the Facebook API SDK for Android?

Thanks.

解决方案

 Bundle params = new Bundle();
 params.putString("fields","birthday");
 JSONObject jObject1 = new JSONObject(authenticatedFacebook.request("me/friends",params));     

Now if you print the jobject1 you will get the all your friends birthday list..

The response will be in JSON format you have to get the value from it..

authenticatedFacebook is you object for Facebook..

For further clarification you check in this link.....

private static final String[] PERMISSIONS =
    new String[] {"friends_birthday","read_stream", "offline_access"};

Make sure that you gave permission for accessing friends Birthday date..