Google Play网址会混淆Facebook的共享对话框 [英] Google Play URL messes up Facebook's share dialog

查看:340
本文介绍了Google Play网址会混淆Facebook的共享对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Facebook上分享一个标题和描述的图片,但是当我将Google PLay网址设置为ContentUrl时,就不会显示标题和描述。



这是我的代码:

  if(ShareDialog.canShow(ShareLinkContent.class)){
ShareLinkContent linkContent = new ShareLinkContent.Builder()
.setContentTitle(我想要这辆车)
.setContentUrl(Uri.parse(http://www.producthunt.com))
.setImageUrl(Uri.parse(http://www.topgear.com/uk/assets/cms/50b95ad3-7884-4b3d-ba3c-68dbeff8b737/Large%20Image%20(optional).jpg))
.build();
shareDialog.show(linkContent);
}

结果:





但是当我将Google Play网址设置为ContentURL:

  if(ShareDialog.canShow(ShareLinkContent.class)){
ShareLinkContent linkContent = new ShareLinkContent.Builder()
.setContentTitle(我想要这辆车)
.setContentDescription(此描述应显示在图像下方,但不知何故取决于链接。)
.setContentUrl(Uri.parse(https://play.google.com/store/apps/details?id=com.evernote))
.setImageUrl(Uri.parse(http:// www .topgear.com / uk / assets / cms / 50b95ad3-7884-4b3d-ba3c-68dbeff8b737 / Large%20Image%20(可选).jpg))
.build();
shareDialog.show(linkContent);

}



结果: p>



我尝试过与其他一般和谷歌播放链接,我总是得到相同的结果。
怎么了?



编辑



我将此问题提交给Facebook团队,尽管他们承认这是一个错误,我被告知,他们不会很快修复它。
https://developers.facebook.com/bugs/1435972263375939

解决方案

我发现1部分解决方案可能会根据您的要求而工作。
替换 https://play.google.com /store/apps/details?id=com.xxx.yyy 的重定向地址。我使用在我的Facebook应用程序配置 https://fb.me/xxxxxxxxxxxxxxx 中创建的一个。
共享的结果与自定义contentDescription正常工作。
剩下的问题是预览在分享到Facebook弹出窗口中不起作用(在您发布到Facebook之后将会添加预览)。如果您不用担心用户看到该预览,此解决方案可能适用于您。


I am trying to share an image with title and description on Facebook but it looks like when I set a Google PLay URL as the ContentUrl then the title and description are not displayed.

This is my code:

if (ShareDialog.canShow(ShareLinkContent.class)) {
    ShareLinkContent linkContent = new ShareLinkContent.Builder()
      .setContentTitle("I want this car")
      .setContentUrl(Uri.parse("http://www.producthunt.com"))
      .setImageUrl(Uri.parse("http://www.topgear.com/uk/assets/cms/50b95ad3-7884-4b3d-ba3c-68dbeff8b737/Large%20Image%20(optional).jpg"))
      .build();
    shareDialog.show(linkContent);
}

The Result:

But when I set a Google Play URL as ContentURL:

if (ShareDialog.canShow(ShareLinkContent.class)) {
      ShareLinkContent linkContent = new ShareLinkContent.Builder()
         .setContentTitle("I want this car")
         .setContentDescription("This description should be displayed below the image but somehow it depends on the link.")
         .setContentUrl(Uri.parse("https://play.google.com/store/apps/details?id=com.evernote"))
         .setImageUrl(Uri.parse("http://www.topgear.com/uk/assets/cms/50b95ad3-7884-4b3d-ba3c-68dbeff8b737/Large%20Image%20(optional).jpg"))
         .build();
   shareDialog.show(linkContent);

}

The Result:

I tried this with other general and google play links and I always got the same result. What's wrong?

EDIT

I submitted this question to the Facebook team and even though they admitted that this is a bug I was told that they won't fix it any time soon. https://developers.facebook.com/bugs/1435972263375939

解决方案

I found 1 partial solution that may work depending on your requirements. Replace "https://play.google.com/store/apps/details?id=com.xxx.yyy" by a redirect address. I used one created in my Facebook app configuration "https://fb.me/xxxxxxxxxxxxxxx". The result of the share is working correctly with the custom contentDescription. The remaining issue is that the preview is not working in the "share to Facebook" popup ("A preview will be added after you post this to Facebook"). If you don't worry about your users seeing that preview this solution may work for you.

这篇关于Google Play网址会混淆Facebook的共享对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆