获取所有的Facebook从墙上提要和使用使用FBConnect POST方法 [英] Get all Facebook feeds from my wall and using POST method using FBConnect

查看:454
本文介绍了获取所有的Facebook从墙上提要和使用使用FBConnect POST方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现Android应用程序的Facebook功能。
我使用FBConnect.jar
我有两个问题。

I'm trying to implement Facebook features in android Application. I'm using FBConnect.jar i have two questions


  1. 我可以张贴一些使用以下code壁

  1. I can post something to wall using following code

    String response = mFacebook.request("me");
    Bundle parameters = new Bundle();
    parameters.putString("message", msg);
    parameters.putString("description", "test test test");
    response = mFacebook.request("me/feed", parameters, "GET");

在这里,我已经使用GET方法。是否有可能使用POST方法若然是语法

Here i have used GET method. Is it possible to use POST method if so what is the syntax

然后,如果我要得到我用下面的code我的帐户的新闻供稿

Then if i want to get news feeds of my account i use following code

        JSONObject response = Util.parseJson(mFacebook.request("me/feed"));
        JSONArray jArray = response.getJSONArray("data");
        for(int i=0;i<jArray.length();i++){
            json_data = jArray.getJSONObject(i);
            if(json_data.has("message") && (json_data.has("name"))){
                String name = json_data.getString("name");
                String message=json_data.getString("message");
                Log.i("GET ACTIVITY",String.format("Name is %s and Message is %", name,message));
            }
        }


在这里我可以得到那些发表在我的帐户饲料。但是,如果我想,在我的墙上(朋友和我)所有的Facebook的饲料。请给我一些示例code了。

Here i can get feeds that are posted by me in my account. But if i want all Facebook feeds that are in my wall (Friends and me). pls give me some sample code too.

谢谢,
尚穆根。

Thanks, Shanmugam.

推荐答案

我试试/家,而不是我/饲料

Try me/home instead of me/feed

这篇关于获取所有的Facebook从墙上提要和使用使用FBConnect POST方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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