【问题标题】:android facebook integration online friend and send inbox messageandroid facebook 集成在线好友并发送收件箱消息
【发布时间】:2017-01-08 20:58:41
【问题描述】:

我将 Facebook 集成到我的 Android 应用程序中,并使用此代码来获取朋友:

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();
    }

有没有办法将消息发送到朋友的收件箱,而不是在墙上发帖?

【问题讨论】:

    标签: android facebook-graph-api


    【解决方案1】:

    如果您是 Facebook 聊天客户端,您会获得在线朋友,这是非常不同的事情。 到现在还不能发私信有send dialog但是我之前没试过

    【讨论】:

      猜你喜欢
      • 2013-02-10
      • 2011-05-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多