排序Facebook好友生日列表月明智的安卓 [英] Sort Facebook Friends Birthdays List Month Wise in Android

查看:161
本文介绍了排序Facebook好友生日列表月明智的安卓的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  

可能重复:
  <一href="http://stackoverflow.com/questions/14373862/hackbook-sample-$c$c-to-fetch-list-of-current-month-facebook-friends-birthdays">Hackbook样品code到取当月名单的Facebook好友生日

我已经作出了计划,对此我的撷取的列表我所有的的Facebook好友 ..

现在我想我模块的更多的自定义用户的,并希望让用户看到自己的好友列表月明智

问:

 如何排序的Facebook好友列表中的当前月或周只有那些生日...
 

code获取所有好友的列表:

 公共静态无效requestFriends(FacebookRequest facebookRequest){
Log.d(LOG_TAGrequestFriends(+));
字符串查询=选择姓名,生日,UID,从用户pic_square其中uid中(从朋友选择UID2那里UID1 =我()),以便通过birthday_date;
捆绑PARAMS =新包();
params.putString(法,fql.query);
params.putString(查询,查询);
FacebookUtility.asyncRunner.request(NULL,则params,
新FacebookRequestListener(FacebookRequestListener.FRIENDS,facebookRequest));
}
 

code,以获取好友列表那些生日在一月月:

 字符串查询=选择姓名,生日,UID,pic_square从用户那里UID的(从朋友选择UID2那里UID1 =我())和birthday_date&GT; = '01 / 01 与birthday_date&LT; = '01 / 31'ORDER BY birthday_date ASC;
 

解决方案

据我所知,你已经知道了如何从具体月份得到朋友。 虽然我不知道android的,我相信你只需要获得当前月份和FQL插入。

 日历C = Calendar.getInstance();
INT月= c.get(Calendar.MONTH)
字符串查询=选择姓名,生日,UID,pic_square从用户那里UID的(从朋友选择UID2那里UID1 =我())和birthday_date&GT; ='+月+/ 01和birthday_date&LT; ='+月+/ 31ORDER BY birthday_date ASC;
 

或者类似的东西。

Possible Duplicate:
Hackbook sample code to Fetch List of Current Month Facebook Friends Birthdays

I have made a program in which i am Fetching list of my all Facebook Friends..

Now i want to make my module more custom for users and want to allow user to see their Friends List Month Wise

Question:

How to sort Facebook Friends List those birthdays in Current Month or Week only...

Code to Fetch List of all Friends:

 public static void requestFriends(FacebookRequest facebookRequest) {
Log.d(LOG_TAG, "requestFriends(" + ")");
String query = "select name, birthday, uid, pic_square from user where uid in (select uid2 from friend where uid1=me()) order by birthday_date";
Bundle params = new Bundle();
params.putString("method", "fql.query");
params.putString("query", query);
FacebookUtility.asyncRunner.request(null, params, 
new   FacebookRequestListener(FacebookRequestListener.FRIENDS, facebookRequest));
}

Code to Fetch List of Friends those birthdays in January Month:

String query = "select name, birthday, uid, pic_square from user where uid in (select uid2 from friend where uid1=me())AND birthday_date >= '01/01' AND birthday_date <= '01/31' ORDER BY birthday_date ASC";

解决方案

From what I understand you already know how to get friends from a specific month. While I don't know android I believe you just need to get the current month and insert it in the fql.

Calendar c = Calendar.getInstance(); 
int month = c.get(Calendar.MONTH)
String query = "select name, birthday, uid, pic_square from user where uid in (select uid2 from friend where uid1=me())AND birthday_date >= '" + month+ "/01' AND birthday_date <= '" + month+ "/31' ORDER BY birthday_date ASC";

Or something similar.

这篇关于排序Facebook好友生日列表月明智的安卓的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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