在Android的Facebook好友生日 [英] Facebook friends birthdays in Android

查看:126
本文介绍了在Android的Facebook好友生日的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在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};
 

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

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..

这篇关于在Android的Facebook好友生日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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