Facebook Open Graph Actions

时间:2017-03-29 20:46:41

标签: android facebook facebook-graph-api

我正在Android应用程序中开发共享功能,而我正面临Open Graph问题。 我已经让我的测试用户发布,并在我的应用程序中集成了SDK和Login。

如果我使用news.reads动作facebook分享对话框出现,我点击发布但没有任何内容发布到我的墙上。 如果我使用news.publishes一切正常。

我错过了什么吗?

非常感谢您提前。 全型

这是我的代码:

        Bitmap image = UtilityFunctions.loadBitmapFromView(mV);
        SharePhoto photo= new SharePhoto.Builder().setBitmap(image)
                .setUserGenerated(true).build();


        // Create an object
        ShareOpenGraphObject object = new ShareOpenGraphObject.Builder()
                .putString("og:type", "article")
                .putString("og:url", ((TextView) mV.findViewById(R.id.linkNews)).getText().toString())
                .putString("og:publisher", "http://www.planetariverplate.com")
                .putString("og:site_name", ((TextView) mV.findViewById(R.id.fuenteNews)).getText().toString())
                .putString("og:title", ((TextView) mV.findViewById(R.id.tituloNews)).getText().toString())
                .putString("og:description", "Compartido desde Planeta River Plate Android App - https://play.google.com/store/apps/details?id=com.fmbaccimobile.planetariverplate.core")
                .putPhoto("og:image", photo)
                .build();


        // Create an action
        ShareOpenGraphAction action = new ShareOpenGraphAction.Builder()
                .setActionType("news.reads")
                .putObject("article", object)
                .build();

        // Create the content
        ShareOpenGraphContent content = new ShareOpenGraphContent.Builder()
                .setPreviewPropertyName("article")
                .setAction(action)
                .build();
        ShareDialog.show(activity, content);

0 个答案:

没有答案
相关问题