是否必须使用HTTPS与Graph API进行通信? [英] Is it mandatory to have a HTTPS to communicate with Graph API?

查看:189
本文介绍了是否必须使用HTTPS与Graph API进行通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道是否必须使用HTTPS与Graph API进行通信?

Does anybody knows is it mandatory to have a HTTPS to communicate with Graph API?

实际上,我们在我们的制作中使用HTTPS运行Facebook应用程序并且它可以正常工作精细。对于同一个应用程序,我们有一个开发/阶段设置,但没有HTTPS。直到2012-02-23,两台服务器都运行良好。现在我们的开发/舞台服务器应用程序抛出错误:

Actually, we have a Facebook app running on our production having HTTPS and it works fine. For same app we have a development/stage setup but don’t have HTTPS. Till 2012-02-23, both the server works fine. Now our app on development/stage server throws below error:

CurlException:28:connect()超时!

CurlException: 28: connect() timed out!

警告:file_get_contents(https://graph.facebook.com/me?access_token = ...):无法打开流:连接超时

Warning: file_get_contents(https://graph.facebook.com/me?access_token=...): failed to open stream: Connection timed out

我'我只是想知道它的HTTPS问题或Facebook是否将IP列入黑名单。

I’m just wondering if its a HTTPS problem or Facebook does blacklisting of IP.

推荐答案

尝试

<?php

if (!extension_loaded('openssl')) {
    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
        dl('php_openssl.dll');
    } else {
        dl('openssl.so');
    }
}

?>

或将openssl.so添加到php.ini并重启服务器

or add openssl.so into your php.ini and restart server

ps发送access_token

p.s. You must use HTTPS when sending access_token

这篇关于是否必须使用HTTPS与Graph API进行通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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