2011-06-10 7 views
3

Facebook을 다루는 iPhone 애플리케이션을 개발 중입니다. 최신 SDK facebook-facebook-ios-sdk-cf1c2c3 (SDK 2.0)을 사용하여 사용자가 OAuth를 사용하여 Facebook 계정에 로그인 할 수 있도록합니다.Facebook Facebook SDK 2.0의 OAuth 로그인 문제

사용자는 장치 iPod Touch (4.3.1)에서 문제없이 로그인 할 수 있습니다. 그러나 아이폰 3GS에서 나는 다음과 같은 오류가 발생합니다 : 링크는 앱 스토어 실행을 위해 그것을 사용하지 않는 언급, https://github.com/facebook/facebook-ios-sdk/issues/139

그러나 :

Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be \u201cm.facebook.com\u201d which could put your confidential information at risk." UserInfo=0x1b8350 {NSErrorFailingURLStringKey=https://m.facebook.com/dialog/oauth?type=user_agent&display=touch&redirect_uri=fbconnect://success&sdk=2&scope=read_stream,publish_stream&client_id=<APP_ID>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSErrorFailingURLKey=https://m.facebook.com/dialog/oauth?type=user_agent&display=touch&redirect_uri=fbconnect://success&sdk=2&scope=read_stream,publish_stream&client_id=<APP_ID>, NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be \u201cm.facebook.com\u201d which could put your confidential information at risk., NSUnderlyingError=0x1b83a0 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be \u201cm.facebook.com\u201d which could put your confidential information at risk.", NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x1be310>} 


I extracted the URL from the FBLoginDailog and tried loading it in iPhone -> Safari. It redirects to the following URL and allows the user to login: 

http://m.facebook.com/login.php?app_id=<APP_ID>&sdk=2&cancel=fbconnect://success?error_reason=user_denied&error=access_denied&error_description=The+user+denied+your+request.&fbconnect=1&next=https://www.facebook.com/connect/uiserver.php?method=permissions.request&app_id=<APP_ID>&display=touch&redirect_uri=fbconnect;//success&sdk=2&type=user_agent&fbconnect=1&perms=read_stream,publish_stream&from_login=1&rcount=1 

은 또한, 나는이 링크에서 다음 해결 방법을 찾을 수 있습니다. 하지만, 나는 앱 스토어 실행에 문제가있다.

어떻게 해결할 수 있습니까?

감사와 안부, 디파

답변

10

이것은 SDK 문제가 아니었다. 기기 (3GS)에 설정된 날짜와 시간이 잘못되었습니다.

+0

답변 해 주셔서 감사합니다! 내 친구의 iPhone 3G가 페이스 북에 로그인하지 않는 이유를 실제로 알아 내려고했습니다. 이 1202 오류가 발생했습니다. 인터넷 검색은 도움이되지 않았지만 stackoverflow가 그랬습니다! 감사! +1 – gonzobrains