我写这封信,我正在获取的列表中的应用程序Facebook上的朋友使用Hackbook示例代码,但现在我想获取的名单Facebook上的朋友当月的生日,让我使用这个代码的所有好友列表: 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));}我仍然使用下面的代码来获取当月生日的朋友列表: 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";但是我没有任何记录,我在哪里失踪?
3 回答
慕妹3146593
TA贡献1820条经验 获得超9个赞
使用此查询以升序获取当前月份的Facebook朋友。
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
GCT1015
TA贡献1827条经验 获得超4个赞
我同意您仅获得一月的生日,我可以使用以下查询字符串:String ModifyQuery =“ SELECT uid,name,pic_square,birthday_date来自用户WHERE uid IN(SELECT uid2来自好友WHERE uid1 = me())AND Birthday_date> = '01 / 01'AND Birthday_date <= '01 / 31'ORDER BY Birthday_date ASC“,但我想让它更具动感..
- 3 回答
- 0 关注
- 722 浏览
添加回答
举报
0/150
提交
取消