嗨我试图从facebook获取appname但没有成功。如下所示
String queryApp = "SELECT namespace FROM application WHERE app_id=xxxxxxxxxxx";
Bundle paramsApp = new Bundle();
paramsApp.putString("method", "fql.query");
paramsApp.putString("query", queryApp);
String resultApp = Util.facebook.request(paramsApp);
Log.e("APP RESULT", resultApp);
JSONArray JAApp = new JSONArray(resultApp);
for (int i = 0; i < JAApp.length(); i++) {
JSONObject JOApp = JAApp.getJSONObject(i);
String getDisplayName = JOApp.getString("display_name");
Log.e("DISPLAY NAME", getDisplayName);
}
上面的代码无效。我可以使用facebookasyncrunner
来实现这个目标Facebook facebook = new Facebook(YOUR_APP_ID);
AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(facebook);
// all your paramsApp bundle code
...
mAsyncRunner.request(paramsApp, new BaseRequestListener() {
...
});
但是bot确定如何使用它...任何建议都表示赞赏。
答案 0 :(得分:0)
您只需要请求https://graph.facebook.com/ [APP_ID]
示例:
https://graph.facebook.com/102452128776