Facebook 登录页面为空,无法加载
Posted
技术标签:
【中文标题】Facebook 登录页面为空,无法加载【英文标题】:Facebook login page is empty and will not load 【发布时间】:2017-05-21 14:36:36 【问题描述】:我从他们的网站实现了所有的 macbook 登录步骤。当我单击取消按钮以显示 Facebook 登录页面时,Facebook safari 登录页面将无法加载,甚至无法加载,并且基本上是空白的。这是我的代码。有人可以就我应该做些什么来解决这个问题提供一些编辑或建议。这是我的应用程序。在我的 info.plist 中,我包含了 FacebookAppID、lsApplicationQuiersSchemes、Facebook 显示名称。我还将我的捆绑包标识符放在脸书网站上。有什么我想念的吗。当我按下我的 Facebook 按钮时,它会显示一个空白的 Safari 页面。
import FBSDKCoreKit
import FBSDKLoginKit
import ParseFacebookUtilsV4
import CoreData
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate, UIViewControllerTransitioningDelegate
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool
PFFacebookUtils.initializeFacebook(applicationLaunchOptions: launchOptions)
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
return true
func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool
return FBSDKApplicationDelegate.sharedInstance().application(application, open: url, sourceApplication: sourceApplication, annotation: annotation)
func applicationWillResignActive(_ application: UIApplication)
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
func applicationDidEnterBackground(_ application: UIApplication)
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
func applicationWillEnterForeground(_ application: UIApplication)
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
func applicationDidBecomeActive(_ application: UIApplication)
FBSDKAppEvents.activateApp()
func applicationWillTerminate(_ application: UIApplication)
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
private func setupGlidingCollection()
var config = GlidingConfig.shared
config.buttonsFont = UIFont.boldSystemFont(ofSize: 22)
config.inactiveButtonsColor = config.activeButtonColor
GlidingConfig.shared = config
【问题讨论】:
【参考方案1】:检查你的控制台,它应该给出一个错误。
【讨论】:
它没有。我不知道为什么以上是关于Facebook 登录页面为空,无法加载的主要内容,如果未能解决你的问题,请参考以下文章
不安全登录被阻止:您无法获取访问令牌或从不安全页面登录到此应用程序。尝试将页面重新加载为 https://
Facebook 登录:无法加载 URL 此 URL 的域未包含在应用程序的域中
Facebook Twitter Google line 登录之 fb登录