【问题标题】:Sending message to a friend on facebook Android在 Facebook Android 上向朋友发送消息
【发布时间】:2011-12-12 05:01:00
【问题描述】:

我正在开发一个应用程序,它可以让用户在 facebook 上向朋友发送消息。我查看了 Facebook API,Hackbook 文件夹。我使用了以下代码,但它不起作用。似乎要我为它实现一个新的对话框。

Bundle params = new Bundle();
params.putString("caption", app_name);
params.putString("picture", picture);

dialog(MyClass.this, "send", params, new UpdateStatusListener());

非常感谢任何帮助!

【问题讨论】:

  • 您使用的 dialog() 方法从何而来?

标签: android facebook message friend


【解决方案1】:

查看此片段以在朋友的墙上发布:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-06-15
    • 1970-01-01
    • 2011-07-26
    • 1970-01-01
    • 1970-01-01
    • 2012-04-29
    • 2012-04-27
    相关资源
    最近更新 更多