如何获得安全的封面网址? [英] How to get a securl cover URL?

查看:173
本文介绍了如何获得安全的封面网址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  $ fql_query_url =https:// graph .facebook.com
。/ $ fb_id [id]?fields = cover
。;
try {
$ fql_query_result = @file_get_contents($ fql_query_url);
$ fql_query_obj = json_decode($ fql_query_result,true);
} catch(异常$ o){}
$ cover = $ fql_query_obj [cover] [source];

我得到一个http:// ... url而不是https:// ... url



任何提示?

解决方案

正如@CBroe所指出的,您需要通过将return_ssl_resources参数设置为1来指定您需要安全的URL: https://graph.facebook.com/wtf.no.username/picture?return_ssl_resources=1



编辑:请注意,这不是FQL(Facebook Query Language),这只是一个标准的API调用。


I'm tryng to get the cover url of a FBpage using:

$fql_query_url = "https://graph.facebook.com"
    ."/$fb_id[id]?fields=cover"
."";
try {
    $fql_query_result = @file_get_contents($fql_query_url);
    $fql_query_obj = json_decode($fql_query_result, true);
} catch(Exception $o){   }
$cover = $fql_query_obj[cover][source];

I get an http://... url and not the https://... url

any tips?

解决方案

As @CBroe pointed out, you need to specify you need a secure URL by setting the return_ssl_resources argument to 1: https://graph.facebook.com/wtf.no.username/picture?return_ssl_resources=1.

Edit: Please note that this isn't FQL (Facebook Query Language), this is just a standard API call.

这篇关于如何获得安全的封面网址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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