发布到facebook粉丝页面和用户';在同一时间,他在墙上。安卓

发布到facebook粉丝页面和用户';在同一时间,他在墙上。安卓,facebook,facebook-android-sdk,Facebook,Facebook Android Sdk,我有我的android应用程序,允许用户在Facebook上分享一些有趣的文本片段 在用户的墙上共享效果很好,可以通过本教程实现: 我的应用程序也有一个facebook粉丝页面,我想在该页面上整合所有此类个人股票。 因此,当一些用户在他们的墙上共享文本时,该程序也会将其发布在facebook粉丝页面上,这样,如果有人对讨论感兴趣,他们可以喜欢粉丝页面并订阅其他用户的所有评论 我的问题是,我既可以在用户的墙上发布,也可以在粉丝页面上发布。 我怎么能同时做这两件事呢 public void pos

我有我的android应用程序,允许用户在Facebook上分享一些有趣的文本片段

在用户的墙上共享效果很好,可以通过本教程实现:

我的应用程序也有一个facebook粉丝页面,我想在该页面上整合所有此类个人股票。 因此,当一些用户在他们的墙上共享文本时,该程序也会将其发布在facebook粉丝页面上,这样,如果有人对讨论感兴趣,他们可以喜欢粉丝页面并订阅其他用户的所有评论

我的问题是,我既可以在用户的墙上发布,也可以在粉丝页面上发布。 我怎么能同时做这两件事呢

public void postToWall(){
    Bundle parameters = new Bundle();
        parameters.putString("message", this.messageToPost);
        parameters.putString("description", this.messageDesc);
        parameters.putString("link", this.messageLink);
 // parameters.putString("target_id", FAN_PAGE_ID);

        try {
                facebook.request("me");
             //   String response = facebook.request("me/feed", parameters, "POST");
                String response = facebook.request(FAN_PAGE_ID+"/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();
    }
}
该行发布到用户的墙上

    String response = facebook.request("me/feed", parameters, "POST");
这一页是给粉丝的

            String response = facebook.request(FAN_PAGE_ID+"/feed", parameters, "POST");
我已经为我的应用设置了使用此帖子在粉丝页面上发布的权限

我也有同样的问题,我只是通过两个asyncfacebookrunner类执行请求。所以基本上它们是并行发生的

private AsyncFacebookRunner mAsyncFbRunner; 
private AsyncFacebookRunner mAsyncFbRunner2;

public void postToWall() {

    boolean success = true;

    Bundle params = new Bundle();

    //this is for posting on the walls

    parameters.putString("message", this.messageToPost);
    parameters.putString("description", this.messageDesc);
    parameters.putString("link", this.messageLink);

    mAsyncFbRunner.request("me/feed", params,"POST", new WallPostListener(), success);
    mAsyncFbRunner2.request(FAN_PAGE_ID+/"feed", params,"POST", new WallPostListener(), success);

}