简体   繁体   English

从Instagram获取大型缩略图照片不再使用“替换”

[英]Getting large thumbnail photos from Instagram is no longer working with “replace”

For long time I use this "replace function" to get the thumbnails by Instagram API, it worked well but now they changed somethings and I no longer to use bigger thumbnails by this way. 很长一段时间我使用这个“替换功能”来获取Instagram API的缩略图,它运行良好,但现在他们改变了一些事情,我不再用这种方式使用更大的缩略图。

src="<?= str_replace('s150x150/', 's320x320/', $post->images->thumbnail->url) ?>">

By default thumbnail, it works well. 默认缩略图,它运作良好。 https://scontent.cdninstagram.com/vp/94387bd7b8a247f3f4039f8789772142/5AEE2A9E/t51.2885-15/s150x150/e35/c0.135.1080.1080/26335890_2247807142112483_5882778660510892032_n.jpg https://scontent.cdninstagram.com/vp/94387bd7b8a247f3f4039f8789772142/5AEE2A9E/t51.2885-15/s150x150/e35/c0.135.1080.1080/26335890_2247807142112483_5882778660510892032_n.jpg

But replaced thumbnail size to bigger, it appears a msg: Invalid URL signature. 但是将缩略图大小替换为更大,它会显示一个消息:无效的URL签名。

https://scontent.cdninstagram.com/vp/94387bd7b8a247f3f4039f8789772142/5AEE2A9E/t51.2885-15/s320x320/e35/c0.135.1080.1080/26335890_2247807142112483_5882778660510892032_n.jpg https://scontent.cdninstagram.com/vp/94387bd7b8a247f3f4039f8789772142/5AEE2A9E/t51.2885-15/s320x320/e35/c0.135.1080.1080/26335890_2247807142112483_5882778660510892032_n.jpg

Anyone can help to get bigger thumbnail of Instagram. 任何人都可以帮助获得更大的Instagram缩略图。 They changed API and I feel so tired with Facebook, they have made many changes since sync with FB and everytime like this, the developers have to update with no instructions. 他们改变了API,我对Facebook感到厌倦,他们在与FB同步后做了很多改动,每次这样,开发人员都必须在没有说明的情况下进行更新。

You can try with this trick 你可以尝试这个技巧

src="<?= str_replace('s150x150/', 's320x320/', str_replace('vp/', '', $post->images->thumbnail->url)) ?>">

or 要么

src="<?= str_replace('s150x150/', 's640x640/', str_replace('vp/', '', $post->images->thumbnail->url)) ?>">

You have to replace (delete) also "vp/" on url, and works again. 你必须在url上替换(删除)“vp /”,然后再次工作。 It's a really bad solution, but it's the only that i've found. 这是一个非常糟糕的解决方案,但它是我发现的唯一解决方案。

Copy the link of the profile pic after the "/s150x150/ xxxxxxxx......jpg " to the end of this: 将“/ s150x150 / xxxxxxxx ...... jpg ”之后的配置文件pic的链接复制到此末尾:

" https://instagram.flju2-1.fna.fbcdn.net/vp/e890a9f0b7b40abe5667b06d0fa750e5/ " https://instagram.flju2-1.fna.fbcdn.net/vp/e890a9f0b7b40abe5667b06d0fa750e5/

like: https://instagram.flju2-1.fna.fbcdn.net/vp/e890a9f0b7b40abe5667b06d0fa750e5/ xxxxxxxx......jpg 喜欢: https: //instagram.flju2-1.fna.fbcdn.net/vp/e890a9f0b7b40abe5667b06d0fa750e5/xxxxxxxx ...... jpg

Works right now. 现在就可以了。

A solution would be very nice! 解决方案会非常好! I have also done it like you the last few month. 在过去的几个月里,我也像你一样做了。

I think one of the solutions is to use non-squared fotos from instagram (you get with "standard_resolution") and set it as a background-image and do the "square" via css and display cover… 我认为其中一个解决方案是使用来自instagram的非平方照片(你得到“standard_resolution”)并将其设置为背景图像并通过css和显示封面进行“方形”...

This is my personal solution at the moment… 这是我个人的解决方案......

i opened instagram on google chrome selected the desired post, right-clicked to "save as". 我在谷歌浏览器上打开Instagram选择了所需的帖子,右键单击“另存为”。 after opening the saved html doc. 打开保存的html文档后。 in chrome i right-clicked again to veiw page source. 在Chrome中我再次右键单击以查看页面源。 i scrolled down to line 217 of the page source and one of the links there gave me the picture i wanted. 我向下滚动到页面源的第217行,其中一个链接给了我想要的图片。 not sure that it is the same thing as before but it let me download the picture of the post in a .jpg format. 不确定它和以前一样,但它让我以.jpg格式下载帖子的图片。 hope this helps 希望这可以帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM