【发布时间】:2020-04-15 04:44:26
【问题描述】:
是否支持与 React Native 一起使用 Firebase 可调用函数?
我部署了一个 onCall 函数,我可以在我的仪表板中看到它
我还使用
初始化了函数 // Initialize Cloud Functions through Firebase
firebase.functions();
我使用
调用函数 const func = firebase.functions().httpsCallable('funcName');
func({
param1: '',
param2: '',
param3: '',
param4: ''
}).then(res => {
console.log('success')
console.log(res)
})
但每次我拨打电话时,承诺都会被拒绝,并显示“未找到”消息
我的 firebase 版本是 7.6.1
功能代码:
export const funcName = functions.https.onCall((data, context) =>
{
return { message: 'success' }
})
【问题讨论】:
-
请编辑问题以显示客户端和功能代码。
标签: javascript firebase react-native google-cloud-functions