尝试发布到用户的Facebook墙时出现以下错误,我似乎无法找到源。任何人都有这方面的见解?当发布到用户的墙上时,Facebook SDK API IOS错误
2012-08-29 22:14:38.490 CanP[405:707] Error: HTTP status code: 400
2012-08-29 22:14:38.494 CanP[405:707] FBSDKLog: Response <#1111> <Error>:
The operation couldn’t be completed. (com.facebook.sdk error 5.)
时运行的方法应该张贴讯息facebook的墙上如下:
[FBSettings setLoggingBehavior:[NSSet setWithObjects:
FBLoggingBehaviorFBRequests,
nil]];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setObject:[facebook accessToken] forKey:@"FBAccessTokenKey"];
[defaults setObject:[facebook expirationDate] forKey:@"FBExpirationDateKey"];
[defaults synchronize];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"My test app", @"name",
@"http://www.google.com", @"link",
@"FBTestApp app for iPhone!", @"caption",
@"This is a description of my app", @"description",
@"Hello!\n\nThis is a test message\nfrom my test iPhone app!", @"message",
nil];
// Publish.
// This is the most important method that you call. It does the actual job, the message posting.
[facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
我跟着[相同的教程](http://gabriel-tips.blogspot.nl/2011/10/how-to-post-on-facebook-wall-through.html),我有同样的错误。 – sixstatesaway