使用FacebookDialog.OpenGraphActionDialogBu​​ilder在FB上发布失败

时间:2013-10-04 23:26:13

标签: android facebook facebook-graph-api facebook-opengraph facebook-android-sdk

我想使用下面的代码在FB上发布Open Graph动作。正确显示“本机共享”对话框,其中包含标题,URL和图像集。然而,当我点击按钮在FB上发帖时,我收到了一个“出了问题。请再试一次”toast留言,其中包含“com.facebook.FecebookException:错误发布消息”< / strong>在日志中。没有别的说什么是错的。重新尝试发布,在FB时间轴上发布一个没有Open Graph动作,没有标题,链接,pic的空条目。请帮忙。

    if (canPresentFBShareDialog) {
        // User obj
        OpenGraphObject session = OpenGraphObject.Factory.createForPost("beyondtimer:complete");
        session.setProperty("title", getFBPostString());
        session.setProperty("image", "https://scontent-a-ord.xx.fbcdn.net/hphotos-prn1/1017293_406347859487380_187920371_n.png");
        session.setProperty("url", "https://www.facebook.com/BeyondTimer");
        OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
        action.setProperty("session", session);

        FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(this, action,
                "beyondtimer:complete", "session")
                .build();
        uiHelper.trackPendingDialogCall(shareDialog.present());

    }

1 个答案:

答案 0 :(得分:0)

OpenGraphActionDialogBu​​ilder(this,action,                 “beyondtimer:complete”,“session”)被折旧,删除“beyondtime:complete”?