2015-08-09 49 views
0

因此,最近我有一個單獨的應用程序被拒絕從應用商店使用舊版FB 4.x SDK'反彈用戶到Safari'方法來登錄Facebook。 (準則10.6)解析ParseFacebookUtilsV4登錄問題

要麼我錯過了某些東西,要麼ParseFacebookUtilsV4也這樣做。我可以將其設置爲使用嵌入式webview嗎?

感謝爸爸warbucks。

[PFFacebookUtils facebookLoginManager].loginBehavior = FBSDKLoginBehaviorWeb; 

回答

1

查找該文件中: FBSDKLoginManager.h

typedef NS_ENUM(NSUInteger, FBSDKLoginBehavior) 
    { 
     /*! 
     @abstract Attempts log in through the native Facebook app. If the Facebook app is 
     not installed on the device, falls back to \c FBSDKLoginBehaviorBrowser. This is the 
     default behavior. 
     */ 
     FBSDKLoginBehaviorNative = 0, 
     /*! 
     @abstract Attempts log in through the Safari browser 
     */ 
     FBSDKLoginBehaviorBrowser, 
     /*! 
     @abstract Attempts log in through the Facebook account currently signed in through Settings. 
     If no Facebook account is signed in, falls back to \c FBSDKLoginBehaviorNative. 
     */ 
     FBSDKLoginBehaviorSystemAccount, 
     /*! 
     @abstract Attemps log in through a modal \c UIWebView pop up 

     @note This behavior is only available to certain types of apps. Please check the Facebook 
     Platform Policy to verify your app meets the restrictions. 
     */ 
     FBSDKLoginBehaviorWeb, 
    }; 

,然後看看在Facebook登錄和紅色這解析的頭文件 「PFFacebookUtils.h」:

/*! 
@abstract Login behavior controls whether to allow, force or prohibit Facebook Login or Inline Facebook Login. 

@discussion Default is to allow Facebook Login, with fallback to Inline Facebook Login. 

@returns The login behavior currently set. 
*/ 
+ (FBSessionLoginBehavior)facebookLoginBehavior; 

///-------------------------------------- 
/// @name Logging In & Creating Facebook-Linked Users 

這兩個文件包含您需要的信息,以便更改將用戶發送到X,Y或Z以便登錄的默認方法。

+0

您使用的是什麼版本的PFFVideosUtils?你是自己安裝還是通過cocoapods安裝?我嘗試過使用PFFVideosUtils&PFFVideosUtilsV4 pod,並且無法找到你粘貼在PFF播句Utils標題 – CDM

+0

中的代碼,我正在檢查facebook sdk版本,好吧,所以是的,就像我懷疑的那樣,我是使用最新的Facebook v4.4.0 SDK與Parse SDK最新的1.7.5 – Loxx

+0

我不使用Cocoapods,我不會使用和不能使用免費庫爲我工作的人和Cocoapods引起更大的頭痛比人們意識到。取決於你將哪些庫拉入你的代碼庫中,僅僅爲此提取Parse和Facebook庫或任何其他庫就不難了。 – Loxx

0

這個問題將通過下載最新的Facebook SDK和最新的Parse SDK得到解決,它們已經在最近更新了。新的SDK將帶你到Facebook應用程序登錄。

+0

問題是這樣的事實,它的確如此,與ope在應用程序中使用webview。問題是'我如何設置parse/pffVideosutils'來啓動webview而不是打開本機FB應用程序。 FWIW我正在使用cocoapods來包含最新版本的PFFVideosUtils + Parse sdk。 – CDM