ios - PFFacebookUtil 超时错误
<p><p>我遇到了与此处所述类似的问题:<a href="https://www.parse.com/questions/error-when-trying-to-reauthorise-facebook-user" rel="noreferrer noopener nofollow">https://www.parse.com/questions/error-when-trying-to-reauthorise-facebook-user</a> </p>
<p>当我的应用启动时,如果用户已经登录,它会尝试从 Facebook 获取用户的个人资料图片:</p>
<pre><code>- (void)getFacebookIdAndProfileImageWithSuccess:(void(^)(NSDictionary *))success {
// Send request to Facebook to retrieve profile information
FBRequest *request = ;
[request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (error)
return;
// Result is a dictionary of user information
NSMutableDictionary *userData = (NSMutableDictionary *)result;
NSString *facebookId = userData[@"id"];
;
// Retrieve the user profile image
NSURL *imageUrl = ];
UIImage *image = ];
;
forKey:@"imageUrl"];
success();
}];
}
</code></pre>
<p>好吧,请求返回需要很长时间,当它返回时它会报告错误:</p>
<pre><code>"Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0x146aa790 {com.facebook.sdk:ErrorInnerErrorKey=Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo=0x146a1710 {NSErrorFailingURLStringKey=https://graph.facebook.com/,
NSErrorFailingURLKey=https://graph.facebook.com/, NSLocalizedDescription=The request timed out., NSUnderlyingError=0x1455c110 "The request timed out."}, com.facebook.sdk:HTTPStatusCode=200, com.facebook.sdk:ErrorSessionKey=<PFReceptionist: 0x14685310>}"
</code></pre></p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>我删除了我的应用程序并重新安装了它。这解决了这个问题。问题可能是在我开始收到此错误之前,我试图解决我的应用程序遇到的另一个 Facebook 相关问题。我尝试的其中一件事是删除我的 Facebook 帐户设置 > Facebook。也许这与这个错误有关,我不确定。</p></p>
<p style="font-size: 20px;">关于ios - PFFacebookUtil 超时错误,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/21937954/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/21937954/
</a>
</p>
页:
[1]