gpt4 book ai didi

ios - 无法在 iOS 应用中与 google+ 中的图片共享 url

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:38:08 26 4
gpt4 key购买 nike

我正在开发一个应用程序,我试图在其中通过 google+ 与 url 共享图像。我正在使用 GPPNativeShareBuilder。但它不分享任何内容并发出以下警告“您不能同时将链接和媒体附加到帖子。”

同样在谷歌论坛的方法描述中提到

  • (id) attachImage: (UIImage *) imageAttachment
    如果存在现有的媒体附件,则会将其替换。如果 imageAttachment 为 nil,则此方法不执行任何操作并返回 nil。此方法不能与 setURLToShare: 或 setTitle:description:thumbnailURL: 结合调用。

请建议我解决此问题的任何解决方案。

最佳答案

我们不允许在帖子中同时添加图片和链接,
但是我们可以在链接中添加“元”,必须在链接页面的标题中添加“元”,
并在此“元”中定义图像。

Google 使用 Open Graph (og) 元作为 Facebook,这是示例元,

<meta property="og:site_name" content="Your Site Name" />
<meta property="og:title" content="Title of the Post" />
<meta property="og:description" content="Description for the post" />
<meta property="og:url" content="URL where you want to redirect on web" />
<meta property="og:image" content="Your image URL" />

这是一个很好的例子的示例网站
http://moz.com/blog/meta-data-templates-123
http://www.bruceclay.com/blog/how-to-use-social-meta-tags/

关于ios - 无法在 iOS 应用中与 google+ 中的图片共享 url,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20424174/

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