通过Instagram API拍摄1080x1080照片 [英] 1080x1080 photos via Instagram API

查看:265
本文介绍了通过Instagram API拍摄1080x1080照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

http://www.theverge. com/2015/7/6/8899807/instagram-1080p-pictures-photo-upload

The Verge最近公布了Instagram的最新应用程序版本,它们正在以1080x1080分辨率上传照片.浏览网站的源代码时,可以很容易地通过HTML来获取这些照片.可以通过官方Instagram API访问吗?如果可以,怎么办?

The Verge recently made known the latest app versions of Instagram are uploading photos in 1080x1080 resolution. These photos can be easily sourced via HTML when browsing the site's source code. Can these be accessed via the official Instagram API? And if so, how?

推荐答案

[更新] 2018年3月23日之后

我使用了Ekrem Gurdal的答案来使其起作用:

I used Ekrem Gurdal's answer to make it work:

IG API为您提供链接"属性,例如 https://www.instagram.com/p/BTduOwSAwN6/

The IG API gives you "link" attribute, e.g. https://www.instagram.com/p/BTduOwSAwN6/

然后您可以将?__ a = 1附加到此 https://www.instagram.com/p/BTduOwSAwN6/?__a=1

Then you can append ?__a=1 to this e.g. https://www.instagram.com/p/BTduOwSAwN6/?__a=1

您可以从存储高分辨率照片的json结果中提取: graphsql.shortcode_media.display_url

And you can extract from the json result where the high resolution photo is stored: graphsql.shortcode_media.display_url

例如 .fmnl2-1.fna.fbcdn.net/vp/f8f54b9fcb2bca69d7c73d9ffb232d64/5C324A1C/t51.2885-15/e35/18161146_397673830625587_2385146908864675840_n.jpg

希望这会有所帮助.也许IG人员也会在将来找到一种方法来禁用此功能.为什么他们不只是在API响应中包含高分辨率照片,smh

Hope this helps. Maybe IG folks will also find a way to disable this in the future. Why do they not just include the hi-res photo in the API response, smh

[更新]截至2018年3月23日,下面的解决方法不再起作用.

只需更新2018年正在关注此问题的任何人.对我有用的解决方案是在将分辨率替换为1080x1080的基础上删除"vp/".

Just to update anyone who's looking at this in 2018. The solution that worked for me is to remove the "vp/" on top of replacing the resolution to 1080x1080.

例如

https://scontent.cdninstagram.com/vp/41d5aee08758061976d26e48f45e673a/5ADA338E/t51.2885-15/s320x320/e35/20065394_1785212551507111_5192354829363576832_n.jpg

https://scontent.cdninstagram.com/41d5aee08758061976d26e48f45e673a/5ADA338E/t51.2885-15/s1080x1080/e35/20065394_1785212551507111_5192354829363576832_n.jpg

这篇关于通过Instagram API拍摄1080x1080照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆