没有不值得去解决的问题,也没有不值得去学习的技术!

Resolve the “Please Long-Press the URL to Copy and Open in a Browser” Prompt When Links Posted via the Weibo Open Platform API Are Opened

When the link opened, it prompted: To browse, long-press the URL to copy it and use a browser to visit.

作者:

在

,

1. After publishing a Weibo link to the platform via the Weibo Open Platform API, I clicked the web link on my homepage. See Figure 1.

After publishing a Weibo link to the platform via the Weibo Open Platform API, I clicked the web link on my homepage.
Figure 1

2. When the link opened, it prompted: To browse, long-press the URL to copy it and use a browser to visit. See Figure 2.

When the link opened, it prompted: To browse, long-press the URL to copy it and use a browser to visit.
Figure 2

3. The URL is: https://newstatic.szscmc.com/szaqjsyjy_html/66wblm/32459.shtml . It opens normally. See Figure 3.

The URL is: https://newstatic.szscmc.com/szaqjsyjy_html/66wblm/32459.shtml . It opens normally.
Figure 3

4. I decided to manually publish a Weibo post based on this link in the Weibo backend. See Figure 4.

I decided to manually publish a Weibo post based on this link in the Weibo backend.
Figure 4

5. After publishing successfully, I clicked the web link. When the link opened, it prompted: To browse, long-press the URL to copy it and use a browser to visit. See Figure 5.

After publishing successfully, I clicked the web link. When the link opened, it prompted: To browse, long-press the URL to copy it and use a browser to visit.
Figure 5

6. I decided to manually publish a Weibo post based on a link in the Weibo backend. However, the Weibo URL is: https://www.infoq.cn/article/HefCksLl0AgTagb7Aex1 . See Figure 6.

I decided to manually publish a Weibo post based on a link in the Weibo backend. However, the Weibo URL is: https://www.infoq.cn/article/HefCksLl0AgTagb7Aex1 .
Figure 6

7. After publishing successfully, I clicked the web link. It can be opened directly without copying. See Figure 7.

After publishing successfully, I clicked the web link. It can be opened directly without copying.
Figure 7

8. I initially suspected this was related to the link itself. I decided to add the secure domain www.infoq.cn to the Weibo application. Then, I published a Weibo link to the platform via the Weibo Open Platform API. After publishing successfully, I clicked the web link. It can be opened directly without copying. See Figure 8.

I initially suspected this was related to the link itself. I decided to add the secure domain www.infoq.cn to the Weibo application. Then, I published a Weibo link to the platform via the Weibo Open Platform API. After publishing successfully, I clicked the web link. It can be opened directly without copying.
Figure 8

9. The link that requires copying the URL: https://newstatic.szscmc.com/szaqjsyjy_html/66wblm/32459.shtml . The link that can be opened directly: https://www.infoq.cn/article/HefCksLl0AgTagb7Aex1 . This indicates that needing to copy the URL to open it is indeed related to the URL itself, and is independent of whether the publishing channel is the Weibo backend or the open API.

10. On July 8, 2020, Weibo started adopting an external link whitelist mechanism, providing free services only to whitelisted websites, such as government, news, and certified enterprise websites. It no longer supports redirection for URLs outside the whitelist. Reference URL: https://weibo.com/u/1934183965?is_all=1&is_search=1&key_word=%E9%93%BE%E6%8E%A5#_0 . See Figure 9.

On July 8, 2020, Weibo started adopting an external link whitelist mechanism, providing free services only to whitelisted websites, such as government, news, and certified enterprise websites. It no longer supports redirection for URLs outside the whitelist. Reference URL: https://weibo.com/u/1934183965?is_all=1&is_search=1&key_word=%E9%93%BE%E6%8E%A5#_0 .
Figure 9

11. Since applying for the whitelist takes some time, this analytical conclusion remains to be verified.

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系