I am trying to retrieve the facebook's latest post in my android app by using the code given below. But it gives me only my shares and comments. I want to get these as well as my messages which I post on my status, but it always comes as null.
Bundle params = new Bundle();
params.putString("format", "json");
params.putString("access_token",sp.getString("access_token",null));
String url = "https://graph.facebook.com/me/feed";
String response = Util.openUrl(url, "GET", params);
JSONObject json = Util.parseJson(response);
JSONArray jsonArray = json.optJSONArray("data");
if(jsonArray != null) {
i=0;
String tempName = jsonArray.getJSONObject(i).getString("from");
String tempId = jsonArray.getJSONObject(i).getString("id");
String story = jsonArray.getJSONObject(i).getString("story");
String msg = jsonArray.getJSONObject(i).getString("message");
}
Here, if I post some text on my status then also 'msg' is null.
Please provide your suggestions. Thanks.