【问题标题】:Sharing link from own website to Linkedin app (iOS)从自己的网站共享链接到 Linkedin 应用程序 (iOS)
【发布时间】:2020-06-03 15:44:49
【问题描述】:

我的网站上有一个“分享到 Linkedin”按钮。它基本上只是一个链接,它在桌面上运行良好。这是链接:

https://www.linkedin.com/sharing/share-offsite/?url={我的网址}

但是,这不适用于移动设备。如果我尝试在手机 (iOS) 上从我的网站进行分享,它会打开 Linkedin 应用程序,仅此而已。它不会打开帖子对话框或任何东西。

如何在移动设备上进行这项工作?

【问题讨论】:

    标签: html linkedin share


    【解决方案1】:

    你能用这个网址测试吗:

    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}`);
    

    【讨论】:

    • 我意识到您的“链接”实际上更像是有用的代码。不知道怎么做,但我认为你应该让它更明显。因为这里的人们可能会将其与(不受欢迎的)仅链接答案混淆。此外,如果您可以添加任何解释,它将使答案更加“受欢迎”。但是,如果您发现并像“魔术”一样使用它,我可以理解。 (这里没有什么不好的意思,没有愤世嫉俗之类的,只是为了清楚。)
    猜你喜欢
    • 2013-10-03
    • 2014-04-01
    • 2012-10-30
    • 1970-01-01
    • 1970-01-01
    • 2020-11-06
    • 2014-03-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多