开发者

HTTPS URLs for photos

开发者 https://www.devze.com 2023-04-09 12:59 出处:网络
All photo URLs in the FQL photo table are HTTP-URLs and not HTTPS-URLs. It\'s not poss开发者_高级运维ible to rewrite the URL with https instead of http. How do I do to get the HTTPS-URLs instead?

All photo URLs in the FQL photo table are HTTP-URLs and not HTTPS-URLs. It's not poss开发者_高级运维ible to rewrite the URL with https instead of http. How do I do to get the HTTPS-URLs instead?

Why:

Internet Explorer is warning users with a pop-up when they load a HTTPS page which includes objects with HTTP-URLs. Since Facebook requires apps to have HTTPS support and since Facebook supports Internet Explorer fully (I guess but I'm actually not sure about this), there should be a way to get HTTPS-URLs to photos.

Example FQL query:

SELECT pid, src_small FROM photo WHERE pid IN ('xxx');


In your API call, add a return_ssl_resources=1 parameter, which will cause the image URLs to come back as HTTPS URLs


Try this:

`$params = array(
    'return_ssl_resources'=>1,
     'method' => 'fql.query',
     'query' => "SELECT pid, src_small FROM photo WHERE pid IN ('xxx')",
);
$result = $facebook->api($params);`
0

精彩评论

暂无评论...
验证码 换一张
取 消