当月Facebook好友生日的安卓 [英] Current Month Facebook Friends Birthdays in Android

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

问题描述

我在写一个应用程序中,我获取列表的 Facebook好友使用的 Hackbook样品code 的,但现在我想获取的 Facebook的列表朋友的生日当月,让所有我用这code友列表:

I am writing an app in which i am fetching list of Facebook Friends using Hackbook Sample Code but now i want to fetch list of Facebook Friends those birthdays in Current Month, to get list of all Friends i am using this code:

 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拿到名单的朋友当月的生日的:

 Calendar c = Calendar.getInstance(); 
    int month = c.get(Calendar.MONTH)+ 1;

    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";

但我没有得到任何记录,我在哪里丢失的?

but i am not getting any record, where i am missing ?

推荐答案

使用此查询来获取当前月份Facebook好友升序排列。

Use this query to get the current months facebook friend in ascending order..

SELECT姓名,生日,UID,pic_square从用户其中uid中(选择UID2从朋友哪里UID1 =我())和birthday_date&GT; = '01 / 01/2013'AND birthday_date&LT; = '31 / 01/2013'ORDER BY birthday_date

SELECT name, birthday, uid, pic_square FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1=me())AND birthday_date >= '01/01/2013' AND birthday_date <= '31/01/2013' ORDER BY birthday_date

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

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