验证后的第一个对话框立即失败并关闭对话框 [英] First dialog after authenticating fails immediately and closes dialog
问题描述
我在iOS 5上使用最新的Facebook SDK。我可以使用SSO成功验证用户,然后尝试分享如下链接:
I'm using the latest Facebook SDK on iOS 5. I can use SSO to successfully authenticate the user, and then I attempt to share a link like this:
NSString *appId = [[[NSBundle mainBundle] infoDictionary]
objectForKey:TSFacebookAppID];
NSMutableDictionary* params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
appId, @"app_id",
[url absoluteString], @"link
title, @"caption",
body, @"description",
nil];
[facebook dialog:@"feed" andParams:params andDelegate:self];
第一次尝试这个,对话框出现并立即关闭,调用对话框:didFailWithError:错误委托方法错误是:
The first time I attempt this, the dialog appears and immediately closes, calling the dialog:didFailWithError:error delegate method. The error is:
错误域= NSURLErrorDomain代码= -999无法完成操作。 (NSURLErrorDomain错误-999。)UserInfo = 0x98f2ab0 {NSErrorFailingURLKey = https://m.facebook.com/dialog/feed?link=http%3A%2F%2Fwww.thescore.com%2Fhome%2Farticles %2F184248&安培;描述=纳达尔%20pulls%20out%20of%20Paris%20to%20focus%20on%20ATP%20finals&安培;的access_token = BAABw00HZB06cBALT57lZCM24N4EOtPpOQeCgl7oLUvbHFR0ZAlwgAbPHQ7HANmlBE0aUKVNDmWNYsEqB0wXq28vm4D18T5hLTVDK3x2WjnVjgIVl75RPoOszSB21f4ZD&安培;字幕=文章%20from%20ScoreMobile%20for%20iPhone&安培; APP_ID = 124052647629735&安培; REDIRECT_ uri = fbconnect%3A%2F%2Fsuccess& sdk = 2& display = touch ,NSErrorFailingURLStringKey = https://m.facebook.com/dialog/feed?link=http%3A%2F %2Fwww.thescore.com%2Fhome%2Farticles%2F184248&安培;描述=纳达尔%20pulls%20out%20of%20Paris%20to%20focus%20on%20ATP%20finals&安培;的access_token = BAABw00HZB06cBALT57lZCM24N4EOtPpOQeCgl7oLUvbHFR0ZAlwgAbPHQ7HANmlBE0aUKVNDmWNYsEqB0wXq28vm4D18T5hLTVDK3x2WjnVjgIVl75RPoOszSB21f4ZD&安培;字幕=文章%20from%20ScoreMobile%20for%20iPhone&安培; APP_ID = 124052647629 735& redirect_uri = fbconnect%3A%2F%2Fsuccess& sdk = 2& display = touch }
Error Domain=NSURLErrorDomain Code=-999 "The operation couldn’t be completed. (NSURLErrorDomain error -999.)" UserInfo=0x98f2ab0 {NSErrorFailingURLKey=https://m.facebook.com/dialog/feed?link=http%3A%2F%2Fwww.thescore.com%2Fhome%2Farticles%2F184248&description=Nadal%20pulls%20out%20of%20Paris%20to%20focus%20on%20ATP%20finals&access_token=BAABw00HZB06cBALT57lZCM24N4EOtPpOQeCgl7oLUvbHFR0ZAlwgAbPHQ7HANmlBE0aUKVNDmWNYsEqB0wXq28vm4D18T5hLTVDK3x2WjnVjgIVl75RPoOszSB21f4ZD&caption=Article%20from%20ScoreMobile%20for%20iPhone&app_id=124052647629735&redirect_uri=fbconnect%3A%2F%2Fsuccess&sdk=2&display=touch, NSErrorFailingURLStringKey=https://m.facebook.com/dialog/feed?link=http%3A%2F%2Fwww.thescore.com%2Fhome%2Farticles%2F184248&description=Nadal%20pulls%20out%20of%20Paris%20to%20focus%20on%20ATP%20finals&access_token=BAABw00HZB06cBALT57lZCM24N4EOtPpOQeCgl7oLUvbHFR0ZAlwgAbPHQ7HANmlBE0aUKVNDmWNYsEqB0wXq28vm4D18T5hLTVDK3x2WjnVjgIVl75RPoOszSB21f4ZD&caption=Article%20from%20ScoreMobile%20for%20iPhone&app_id=124052647629735&redirect_uri=fbconnect%3A%2F%2Fsuccess&sdk=2&display=touch}
然而,尝试共享链接工作正常。
However, subsequent attempts to share the link work fine.
推荐答案
这已经用3.0 SDK修复了,所以我要关闭这个题。解决方案:将SDK升级到3.0。
This has been fixed with the 3.0 SDK, so I'm going to close this question. Solution: upgrade the SDK to 3.0.
这篇关于验证后的第一个对话框立即失败并关闭对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!