打开图表news.reads不起作用

时间:2017-06-13 06:24:51

标签: facebook facebook-graph-api opengraph article

我的共享对话框遇到了一些麻烦。当我使用books.reads类型动作一切正常,ShareDialog工作,并将新闻发布到Facebook,但当我使用news.reads或news.publishes类型共享对话框时,只有当我尝试从开发者的Facebook帐户共享时才会出现。

books.reads动作效果很好:

ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
                    .putString("og:type", "books.book")
                    .putString("og:url", "http://www.google.com")
                    .putString("og:title", "title")
                    .putString("og:description", "text")
                    .putString("og:image","imageURL")
                    .putString("books:isbn", "0-553-57340-3")
                    .build();
            ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
                    .setActionType("books.reads")
                    .putObject("book", object)
                    .build();
            ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
                    .setPreviewPropertyName("book")
                    .setAction(action)
                    .build();
            ShareDialog shareDialog = new ShareDialog(this);
            shareDialog.show(content);

news.reads仅适用于开发者的Facebook帐户,而SareDialog不会出现在其他帐户中:

    ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
            .putString("og:type", "article")
            .putString("og:url", "http://www.google.com")
            .putString("og:title", "title")
            .putString("og:description", "text")
            .putString("og:image","imageURL")
            .build();
    ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
            .setActionType("news.reads")
            .putObject("article", object)
            .build();
    ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
            .setPreviewPropertyName("article")
            .setAction(action)
            .build();

    ShareDialog shareDialog = new ShareDialog(this);
    shareDialog.show(content);

facebook返回错误消息:“{FacebookServiceException:httpResponseCode:-1,facebookErrorCode:100,facebookErrorType:null,message:App 2012491665000000不允许创建新闻类型的操作:为用户读取115892459000000}”

我应该获得任何权限还是我错过了什么?

0 个答案:

没有答案