【问题标题】:Pinterest API doesn't provide link metadata for articlesPinterest API 不提供文章的链接元数据
【发布时间】:2017-06-06 08:48:06
【问题描述】:

我能够从 API 获取 pin 数据,但该数据不包括 pin 中提到的文章的链接。我只得到一个图片 URL 的链接,Pinterest 上的 pin 链接,如果是视频,视频 URL。 有一个部分包含有关文章链接的信息,但 URL 除外!这是 Pinterest 故意遗漏的吗?还是错误?

在下面的第一个示例中,图钉链接到本文: http://www.bitrebels.com/geek/worlds-tallest-tunnel-slide/

[url] => https://www.pinterest.com/pin/601582462695976350/

[link] => https://www.pinterest.com/r/pin/601582462695976350/4880694774085992885/ce2911ec61615ec208fb683a2ba0b5f956f82935841fc5971ffcfbb87413fb6f                                

[metadata] => [link] => Array
(
[locale] => en
[title] => Tallest Tunnel Slide In The World Is Not For The Faint Hearted
[site_name] => Bit Rebels
[description] => The Slide, found at ArcelorMittal Orbit in London, is the world's tallest tunnel slide and it will take you a whopping 40 seconds to reach the bottom!
[favicon] => https://s-media-cache-ak0.pinimg.com/favicons/89e7e1209b5f9f9c74429abf7724bc4e3fea6b0de84bf72942765648.png?89a711f94fe87f5d1741cbaa8c2b5b94
)

对于视频,我明白了:

[attribution] => Array
(
[title] => Null Stern Hotel (Landversion) â Bericht auf blick.ch
[url] => http://www.youtube.com/watch?v=ITEg_7-JVv4
[provider_icon_url] => https://s.pinimg.com/images/api/attrib/youtube@2x.png
[author_name] => sonderaufgaben2000
[provider_favicon_url] => https://s.pinimg.com/images/api/attrib/youtube.png
[author_url] => https://www.youtube.com/user/sonderaufgaben2000
[provider_name] => youtube
)

【问题讨论】:

    标签: api url hyperlink pinterest


    【解决方案1】:

    我找到了答案。

    API 返回的 Pin 对象包含一个“可填充”数组,它指示所有可用的字段。

    有一个“original_link”字段包含我所追求的链接,但在 Pinterest 的 API 文档中的任何地方都没有提及。

    它是 'fillable' 数组中的第 13 项/最后一项,这可能表明它是在 API 文档发布后添加的...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-07
      • 1970-01-01
      • 2012-04-29
      • 1970-01-01
      • 2016-10-06
      • 2016-01-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多