facebook 3.5sdk open graph明确地分享

arv*_*lx2 11 facebook facebook-graph-api facebook-opengraph

我正在尝试将我的OpenGraph动作添加到新闻源,我了解到这一点,我需要将ExplicitlyShared功能添加到Facebook应用程序的OpenGraph操作设置中,我做到了.然而,当我把它放在我的代码中时,像这样:

OpenGraphObject model = OpenGraphObject.Factory.createForPost("origame_app:model");
model.setProperty("title", modelname);
model.setProperty("url", "http://samples.ogp.me/1386546688246429");
model.setProperty("description", modeldesc);

Bitmap bitmap = decodeSampledBitmapFromUri(filepath[position], 500, 500);
List<Bitmap> images = new ArrayList<Bitmap>();
images.add(bitmap);

OpenGraphAction action = GraphObject.Factory.create(OpenGraphAction.class);
action.setProperty("model", model);
action.setExplicitlyShared(true);

@SuppressWarnings("deprecation")
FacebookDialog shareDialog = new FacebookDialog.OpenGraphActionDialogBuilder(this, action, "origame_app:fold", "model")
    .setImageAttachmentsForObject("model", images, true)
    .build();

uiHelper.trackPendingDialogCall(shareDialog.present());
Run Code Online (Sandbox Code Playgroud)

我收到一个错误.但是否则OpenGraph工作得很好.有什么问题?

mar*_*ral 0

我也在处理这个问题,最后我找到了解决方法。而不是打电话

action.setExplicitlyShared(true);
Run Code Online (Sandbox Code Playgroud)

使用

action.setProperty("explicitly_shared", true);
Run Code Online (Sandbox Code Playgroud)

我向 Facebook 报告了这个错误:https ://developers.facebook.com/bugs/559486710849474/ 。