Facebook在Android上的朋友墙上发布

时间:2011-03-12 05:14:07

标签: android facebook

我想将照片发布到我朋友的墙上。

但是我登录了我的帐户说test@gmail.com,但现在我想发帖到我的朋友墙上。

我有我所有朋友的身份和姓名。

是否可以通过登录我的帐户在朋友墙上发布图片?如果是这样,怎么可能?

2 个答案:

答案 0 :(得分:4)

try{
        Bundle parameters = new Bundle();
        JSONObject attachment = new JSONObject();

        try {
            attachment.put("message", "Messages");
            attachment.put("name", "Get utellit to send messages like this!");
            attachment.put("href", link);
        } catch (JSONException e) {
        }
        parameters.putString("attachment", attachment.toString());
        parameters.putString("message", "Text is lame. Listen up:");
        parameters.putString("target_id", "XXXXX"); // target Id in which you need to Post 
        parameters.putString("method", "stream.publish");
        String  response = authenticatedFacebook.request(parameters);       
        Log.v("response", response);
    }
    catch(Exception e){}

答案 1 :(得分:1)

Facebook SDK以及Android版SDK允许您这样做。请参阅示例代码here

相关问题