gpt4 book ai didi

android - 无法与 Android Facebook SDK 4 共享开放图

转载 作者:行者123 更新时间:2023-11-29 19:31:10 25 4
gpt4 key购买 nike

代码:

String imgURL = mShareParams.getImageURL();
imgURL = imgURL.substring(0, imgURL.lastIndexOf("/"));
ShareOpenGraphObject object = new ShareOpenGraphObject.Builder().putString("og:type", "article").putString("fb:app_id",mContext.getString(R.string.facebook_app_id)).putString("og:url", mShareParams.getUrl()).putString("og:title", mShareParams.getContentTitle()).putString("og:image", imgURL).putString("og:image:type", "png").build();
ShareOpenGraphAction action = new ShareOpenGraphAction.Builder().setActionType("og.likes").putObject("article", object).build();
ShareOpenGraphContent content = new ShareOpenGraphContent.Builder() .setPreviewPropertyName("article").setAction(action).build();
if (ShareDialog.canShow(ShareLinkContent.class)) {
ShareDialog.show((Activity)mContext, content);
}

结果:

Action Requires At Least One Reference:The action you're trying to publish is invalid because it does not specify any reference objects.At least one of the following properties must be specified:object.

最佳答案

您的问题出在操作类型 og.likes 中。您应该将其更改为:

news.publishesnews.reads

关于android - 无法与 Android Facebook SDK 4 共享开放图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39928412/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com