我使用 iron.io 调用以下 parse.com 函数来获取我用户 friend 的 Facebook 详细信息。
var getDetailsForID = function (fbID) {
var thePromise = new Parse.Promise();
// TODO: maybe we can batch several users together into a single request................
console.log("Enter getDetailsForID");
FB.api('/v1.0', 'post', {
batch: [
{ method: 'get', name: 'basic', relative_url: fbID + '?fields=id,name,gender&include_headers=false', omit_response_on_success: false },
]
}, function(res) {
console.log("Enter callback in getDetailsForID");
if(!res || res.error) {
console.log(!res ? 'error occurred' : res.error);
return;
}
console.log(" getDetailsForID res: " + res);
thePromise.resolve(res);
});
console.log("Exit getDetailsForID");
return thePromise;
}
在 iron.io 日志中我看到:
Enter callback in getDetailsForID
[Error: 139994800940864:error:0607907F:digital envelope routines:EVP_PKEY_get1_RSA:expecting an rsa key:../deps/openssl/openssl/crypto/evp/p_lib.c:288:
以下不被调用:
console.log(" getDetailsForID res: " + res);
thePromise.resolve(res);
知道如何解决这个问题吗?
最佳答案
自从回答了这个问题,IronWorker 发布了一个 Docker 工作流。请随意使用我们的官方 iron/node Docker 镜像。 https://github.com/iron-io/dockerworker/tree/master/node
关于facebook - parse.com 或 iron.io 返回 ssl 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24861036/