如何从Twitter实体获得直接的Instagram链接?

ear*_*l3s 11 javascript php instagram

我有一个Twitter提要,我可以在推文中找到Instagram网址.

{
    indices: [
        90,
        110
    ],
    url: "http://t.co/kF9EXifn",
    expanded_url: "http://instagr.am/p/QC8hWKL_4K/",
    display_url: "instagr.am/p/QC8hWKL_4K/"
}
Run Code Online (Sandbox Code Playgroud)

我需要的是从该对象获取扩展的URL"http://instagr.am/p/QC8hWKL_4K/",并获得仅仅是图像本身的链接,而不是Instagram网站上的图像.谁知道怎么做?我甚至可以从网址中获取该链接吗?

Joh*_*n C 39

您可以通过附加/media/到URL 来获取图像.使用您的示例:http://instagr.am/p/QC8hWKL_4K/media/.

你甚至可以指定一个大小,

t(缩略图),m(中),l(大)中的一个.默认为m.

所以对于缩略图:http://instagr.am/p/QC8hWKL_4K/media/?size = t

文档在这里.