我有這樣的代碼,其正在爲FB API的調用與FQL查詢在Android應用使用FQL
String fql = "SELECT name,type,page_id FROM page where page_id IN (SELECT page_id FROM page_fan WHERE uid = me())";
Bundle parameters = new Bundle();
parameters.putString("query", fql);
parameters.putString("access_token", fb.getAccessToken());
String url = (fql != null) ? "https://api.facebook.com/method/fql.query" : "https://api.facebook.com/restserver.php";
String response = Util.openUrl(url, "GET", parameters);
System.out.println(response);
即時得到響應
<?xml version="1.0" encoding="UTF-8"?><fql_query_response xmlns="http://api.facebook.com/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" list="true"/>
查詢在FB圖探險家的作品(展示了一些數據)。我也正在使用graph.facebook.com以及其他相同的令牌,並且他們的工作很好。
不知道如何我可以從android做出正確的fql查詢..我已經檢查了所有在SO中給出的例子,但沒有結果。我也嘗試使用URLEncoder.encode編碼url。
請給我幾點提示,我失蹤了。
嗨路西法,thaks您的評論。你能告訴我,如果有人回答我的問題會有什麼影響?我確實重新掃描了我以前的問題 - 但是我不接受我認爲的答案的那些沒有回答 – AndroidGecko 2012-01-30 14:22:28
好。找到了答案。將在5小時後發佈封鎖通過 – AndroidGecko 2012-01-30 15:09:00