【发布时间】:2020-06-03 15:44:49
【问题描述】:
我的网站上有一个“分享到 Linkedin”按钮。它基本上只是一个链接,它在桌面上运行良好。这是链接:
https://www.linkedin.com/sharing/share-offsite/?url={我的网址}
但是,这不适用于移动设备。如果我尝试在手机 (iOS) 上从我的网站进行分享,它会打开 Linkedin 应用程序,仅此而已。它不会打开帖子对话框或任何东西。
如何在移动设备上进行这项工作?
【问题讨论】:
我的网站上有一个“分享到 Linkedin”按钮。它基本上只是一个链接,它在桌面上运行良好。这是链接:
https://www.linkedin.com/sharing/share-offsite/?url={我的网址}
但是,这不适用于移动设备。如果我尝试在手机 (iOS) 上从我的网站进行分享,它会打开 Linkedin 应用程序,仅此而已。它不会打开帖子对话框或任何东西。
如何在移动设备上进行这项工作?
【问题讨论】:
你能用这个网址测试吗:
https://www.linkedin.com/shareArticle/?mini=true&url=${this.currentUrl}
const url = https://www.linkedin.com/shareArticle?mini=true&url=${this.currentUrl}&title=${this.title}&source=${this.client.name}
const title = 'Linkedin'
const width = 600
const height = 400
let left = window.screen.width - width
let top = window.screen.height - height
top = top > 0 ? top / 2 : 0
left = left > 0 ? left / 2 : 0
window.open(url, title, `width=${width},height=${height},resizable=yes,left=${left},top=${top}`);
【讨论】: