How to get large image from facebook graph api for video

不羁岁月 提交于 2019-12-11 16:03:36

问题


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

Response is like this

{
"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"
}

The returned image is this small


回答1:


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

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



来源:https://stackoverflow.com/questions/49003209/how-to-get-large-image-from-facebook-graph-api-for-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!