在朋友的墙在Android的Facebook发布朋友、Android、Facebook

2023-09-12 08:01:14 作者:核对表

我想张贴图片为我的朋友的墙上。

不过,我登录到我的账户说test@gmail.com,但现在我要张贴到任何我的朋友墙。

我有我所有的朋友ID和名称。

是否有可能在张贴朋友墙上的画被记录到我的帐户?如果是的话怎么可能?

解决方案

 尝试{
        捆绑参数=新包();
        JSONObject的附件=新的JSONObject();

        尝试 {
            attachment.put(信息,信息);
            attachment.put(名,获取utellit发送消息像这样!);
            attachment.put(HREF链接);
        }赶上(JSONException E){
        }
        parameters.putString(附件,attachment.toString());
        parameters.putString(信息,文字是瘸子听好了:);
        parameters.putString(target_id,XXXXX); //目标ID中,你需要发布
        parameters.putString(法,stream.publish);
        串响应= authenticatedFacebook.request(参数);
        Log.v(回应,回应);
    }
    赶上(例外五){}
 

I would like to post a picture to my friend's wall.

Facebook似乎在测试让Quest运行通用Android App

But I logged in to my account say test@gmail.com, but now I want to post on to any of my friend wall.

I am having all my friends id and Name.

Is it possible to Post a picture in friends wall by logged to my account? If so how is it possible?

解决方案

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){}