【问题标题】:Google Short Url Api returns encoded urlGoogle Short Url Api 返回编码后的网址
【发布时间】:2013-08-20 03:06:45
【问题描述】:

我正在尝试使用 Google 获取 http://www.facebook.com/sharer/sharer.php?s=100&p[url]=(用于 Facebook 共享)的短网址缩短网址 API。当它返回像 http://goo.gl/xxxxx 这样的短 URL 但后面的长 URL 是 https://www.facebook.com/sharer/sharer.php?s=100&amp%3Bp%5Burl%5D= 时会出现问题,这在 facebook 中不起作用。有什么办法解决这个问题吗?

【问题讨论】:

    标签: php facebook sharing google-url-shortener


    【解决方案1】:

    您可以使用htmlspecialchars_decodeurldecode 来解码网址。

    【讨论】:

    • 这不是正确的方法,因为问题在于缩短的 URL,它会解析为编码的 URL。
    猜你喜欢
    • 1970-01-01
    • 2016-07-20
    • 2020-12-13
    • 2010-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-17
    相关资源
    最近更新 更多