android facebook集成在线朋友并发送收件箱消息

时间:2012-03-12 12:06:42

标签: android facebook-graph-api

我在我的Android应用程序中集成了Facebook,并使用此代码来吸引朋友:

try {

  Facebook mFacebook = new Facebook(Constants.FB_APP_ID);
  AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(mFacebook);
  Bundle bundle = new Bundle();
  bundle.putString("fields", "birthday");
  mFacebook.request("me/friends", bundle);

}catch(Exception e){
  Log.e(Constants.LOGTAG, " " + CLASSTAG + " Exception = "+e.getMessage());
}

有没有办法让网友?

我用这种方法贴在朋友的墙上:

    Bundle parameters = new Bundle();
    parameters.putString("message", message);
    parameters.putString("description", "integrating stuff");
    try {
        facebook.request("me");
        String response = facebook.request("me/feed", parameters, "POST");
        Log.d("Tests", "got response: " + response);
        if (response == null || response.equals("") ||
            response.equals("false")) {
            showToast("Blank response.");
        }
        else {
            showToast("Message posted to your facebook wall!");
        }
    finish();
    } catch (Exception e) {
        showToast("Failed to post to wall!");
        e.printStackTrace();
        finish();
    }

有没有办法向朋友的收件箱发送邮件,而不是张贴在墙上?

1 个答案:

答案 0 :(得分:0)

如果你是Facebook聊天客户,你会得到在线朋友这是非常不同的事情。 直到现在你无法发送send dialog的私信,但我没有尝试在

之前使用它
相关问题