【问题标题】:Upload Images using Blogger Post Image API使用 Blogger Post Image API 上传图片
【发布时间】:2018-07-24 23:28:51
【问题描述】:

有没有办法使用博客 API 上传图片? (https://developers.google.com/blogger/docs/3.0/using) 我有一个网络开发人员在集成 Blogger API 以将图像上传到我的网站时遇到了麻烦。我想如果我能对他有任何帮助。

通常使用 Picasa 将图片上传到 googleusercontent,如下所示: Link to a picasa image

但我想要的是把它上传到这个: Link to a image uploaded from Blogger post

开发人员正在使用 PHP。我尝试搜索许多网站,但没有找到工作版本。 感谢任何帮助。

【问题讨论】:

    标签: php api upload blogger blogspot


    【解决方案1】:

    通过网站直接上传到 Blogger 的图片(URL 格式为x.bp.blogspot.com)也在后台保存在 Picasa 中。

    这些图像使用的域(如lh3.googleusercontent.com3.bp.blogspot.com1.bp.blogspot.com2.bp.blogspot.com4.bp.blogspot.com)本质上是可互换的,并且它们都提供相同的图像。

    例如,使用 googleusercontent URL 的图片(出于测试目的,我使用 Official Blogger Android 应用上传了一张图片)-

    https://lh3.googleusercontent.com/-VESDEmEh7EM/WpCZ_8qD_wI/AAAAAAAAYs0/XDWkxkEz7EUrGUBmpTSEKBGiynGrEKOygCHMYCw/s640/1519426035853.jpg

    也可以使用 bp.blogspot.com URL 访问,例如 -

    https://4.bp.blogspot.com/-VESDEmEh7EM/WpCZ_8qD_wI/AAAAAAAAYs0/XDWkxkEz7EUrGUBmpTSEKBGiynGrEKOygCHMYCw/s640/1519426035853.jpg

    如果您仍想在博客文章中为图片专门使用 x.bp.blogspot.com 格式的 URL,您可以在 PHP 应用程序中编写自定义逻辑来替换 lh3.googleusercontent.com 的所有引用(通过Picasa API)在通过 API 创建帖子之前使用 x.bp.blogspot.com 网址)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-17
      • 2016-03-30
      • 1970-01-01
      • 2020-09-16
      • 2011-08-03
      • 1970-01-01
      • 1970-01-01
      • 2013-12-31
      相关资源
      最近更新 更多