Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Facebook登录问题iOS9+;作语法分析_Ios_Objective C_Facebook_Parse Platform - Fatal编程技术网

Facebook登录问题iOS9+;作语法分析

Facebook登录问题iOS9+;作语法分析,ios,objective-c,facebook,parse-platform,Ios,Objective C,Facebook,Parse Platform,尝试使用以下代码使用Facebook+Parse登录: 我注意到,当单击“使用Facebook登录”按钮时,该按钮会在控制台中显示两次 -canOpenURL:URL:“fbauth2://”失败-错误:“不允许此应用查询方案fbauth2” 这是我的密码: - (IBAction)loginWithFacebook:(id)sender { // Set permissions required from the facebook user account NS

尝试使用以下代码使用Facebook+Parse登录:

我注意到,当单击“使用Facebook登录”按钮时,该按钮会在控制台中显示两次

-canOpenURL:URL:“fbauth2://”失败-错误:“不允许此应用查询方案fbauth2”

这是我的密码:

- (IBAction)loginWithFacebook:(id)sender {
        // Set permissions required from the facebook user account
        NSArray *permissionsArray = @[ @"user_about_me", @"user_relationships", @"user_birthday", @"user_location"];

        // Login PFUser using Facebook
        [PFFacebookUtils logInWithPermissions: permissionsArray block:^(PFUser * _Nullable user, NSError * _Nullable error) {
            if (!user) {
                NSLog(@"Uh oh. The user cancelled the Facebook login.");
            } else if (user.isNew) {
                NSLog(@"User signed up and logged in through Facebook!");
            } else {
                NSLog(@"User logged in through Facebook!");
            }

        }];


}
我已经将它添加到我的plist中,就像在其他主题中一样,但是仍然得到相同的错误[[编辑以回答以下仍然相同的问题]]

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>fb991863067537019</string>
            </array>
        </dict>
    </array>
    <key>FacebookAppID</key>
    <string>991863067537019</string>
    <key>FacebookDisplayName</key>
    <string>Ziplyne</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>facebook.com</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
            </dict>
            <key>fbcdn.net</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
            </dict>
            <key>akamaihd.net</key>
            <dict>
                <key>NSIncludesSubdomains</key>
                <true/>
                <key>NSExceptionRequiresForwardSecrecy</key>
                <false/>
            </dict>
        </dict>
    </dict>
     <key>LSApplicationQueriesSchemes</key>
        <array>
           <string>fbapi</string>
           <string>fb-messenger-api</string>
           <string>fbauth2</string>
           <string>fbshareextension</string>
        </array>
CbundleUrlTypes
循环流化床锅炉方案
fb991863067537019
FacebookAppID
991863067537019
FacebookDisplayName
齐普林
NSAppTransportSecurity
NSExceptionDomains
facebook.com
n包括多个域
NSExceptionRequiresForwardSecretary
fbcdn.net
n包括多个域
NSExceptionRequiresForwardSecretary
akamaihd.net
n包括多个域
NSExceptionRequiresForwardSecretary
LSApplicationQueriesSchemes
fbapi
fb messenger api
fbauth2
fbshareextension

如果您使用iOS SDK 9.0重新编译,如果您使用的是SDK v4.5或更高版本,请在应用程序的plist中添加以下内容:

<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbapi</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>fbauth</string>
    <string>fbauth2</string>
    <string>fb-messenger-api20140430</string>
</array>
LSApplicationQueriesSchemes

如您所说更改了它,但仍然运行到相同的问题。古怪的请参阅“编辑到我的帖子”。@Jamie22您可以尝试以下操作:1)检查您的Facebook SDK版本,2)检查处理openURL的appleDelegate 3)深度清理您的项目并重建:)希望它能工作
<string>fb-messenger-platform-20150128</string>
<string>fb-messenger-platform-20150218</string>
<string>fb-messenger-platform-20150305</string>
<key>LSApplicationQueriesSchemes</key>
<array>
        <string>fbapi</string>
        <string>fb-messenger-api</string>
        <string>fbauth2</string>
        <string>fbshareextension</string>
</array>