如何从Facebook图形API获取大图像以进行视频 [英] How to get large image from facebook graph api for video

查看:95
本文介绍了如何从Facebook图形API获取大图像以进行视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://graph.facebook.com/v2.7/1505552949567253?fields=source,length,picture.type(large),permalink_url&access_token=bla

但是我得到的图像很小,需要放大很多图像,从而导致质量下降,有没有办法我可以在请求中指定图像质量

But I am getting a very small image, which needs to be enlarged a lot thereby losing a lot of quality, is there a way that i can specify the picture quality as well in the request

响应就是这样

{
"source": "https://scontent.xx.fbcdn.net/v/t43.1792-4/22493904_1523143121101563_3196186272225820672_n.mp4?efg=eyJ2ZW5jb2RlX3RhZyI6InN2ZV9oZCJ9&oh=eea85d53fc6e77187d69d6460ad1af3e&oe=5A97C361",
"length": 197.737,
"picture": "https://scontent.xx.fbcdn.net/v/t15.0-10/s160x160/22642569_1505562656232949_2963030712682283008_n.jpg?oh=c2f2fa4ff4f007971c361bfde644ae24&oe=5B19AF67",
"permalink_url": "/InspiredLifePage/videos/1505552949567253/",
"id": "1505552949567253"
}

返回的图像很小

推荐答案

使用thumbnails字段并在is_preferred设置为true的情况下查找对象. picture不响应修饰符.

Use the thumbnails field and look for the object with is_preferred set to true. picture doesn't respond to modifiers.

参考: https://developers.facebook.com/docs/graph -api/reference/video

这篇关于如何从Facebook图形API获取大图像以进行视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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