[英]Facebook integration in iphone app
很抱歉已经问了stackove流中的相同问题。 我正在尝试将Facebook集成到我的iPhone应用程序中。 为此,我遵循了https://developers.facebook.com/docs/mobile/ios/build/#sdk 。 每当我在应用程序中单击Facebook按钮时,它就会正确显示登录屏幕。 但是,每当我单击登录按钮时,都会收到警告,提示“由于地址无效,Safari无法打开页面”。 阅读了很多关于堆栈溢出的问题,这些问题与我的问题有关,但问题未解决。 即使我正确添加了SSO。 非常感谢您的帮助
我的信息清单也正确。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>fb432606956784814</string>
</array>
</dict>
</array>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>VJILConsultingLtd.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string>MainWindow</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
仍然我不明白。 我不明白问题是什么。
如果我没记错,我遇到了同样的问题,就我而言,那是因为我没有在.plist中设置fb [YOUR_APP_ID],您是否正确设置了它?
创建一个名为URL type的新行,其中包含一个单独的项目URL Schemes,其中包含单个值fb [YOUR_APP_ID](文字字符fb后跟您的应用程序ID)。
尝试在Facebook Hackbook示例项目中使用YOUR_APP_ID,在此处找到它: https : //github.com/facebook/facebook-ios-sdk/
要测试YOUR_APP_ID,您需要在两个地方更改项目:
1)在.plist文件中
2)在HackbookAppDelegate.m中搜索kAppId
并将其设置为YOUR_APP_ID,
static NSString* kAppId = @"432606956784814";
如果这可行,那么我们将知道您知道如何正确设置.plist,并且YOUR_APP_ID有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.