使用iOS Swift的Firebase2 Facebook身份验证(无FBSDKLoginButton)

时间:2016-05-30 20:58:39

标签: swift firebase firebase-authentication

我正在尝试使用Firebase 2验证我的登录信息,而不使用FBSDKLoginButton。我使用FBSDKLoginManager来获取我的FB登录令牌,然后当我尝试使用Firebase对其进行身份验证时,我收到以下错误:

错误域= FIRAuthErrorDomain代码= 17023"请求中提供了无效的API密钥。" UserInfo = {NSLocalizedDescription =请求中提供了无效的API密钥。,error_name = ERROR_INVALID_API_KEY}

<string>VegFru</string>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbauth2</string>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbshareextension</string>
    <string>fbapi20130214</string>
    <string>fbapi20130410</string>
    <string>fbapi20130702</string>
    <string>fbapi20131010</string>
    <string>fbapi20131219</string>
    <string>fbapi20140410</string>
    <string>fbapi20140116</string>
    <string>fbapi20150313</string>
    <string>fbapi20150629</string>
    <string>fbapi20160328</string>
    <string>fbauth</string>
    <string>fb-messenger-api20140430</string>
    <string>fb-messenger-platform-20150128</string>
    <string>fb-messenger-platform-20150218</string>
    <string>fb-messenger-platform-20150305</string>
</array>

我在plist中设置了所有信息:

{{1}}

我还从facebook应用程序检查了API,它匹配100%。我真的很无能为什么它不起作用。

提前谢谢。

1 个答案:

答案 0 :(得分:8)

问题来自google-services-plist。它缺少API_KEY,您需要添加它并从google api console获取API。

可以在Google API控制台https://console.developers.google.com/

中找到API密钥