sto usando la nuova Facebook SDK per pubblicare sul mio muro seguendo their instructionspubblicazione sulla mia bacheca di Facebook utilizzando il nuovo SDK
ho ottenuto l'autorizzazione dalla app, ma quando provo a pubblicare sto ottenendo un errore Error: HTTP status code: 400
di seguito vi metto il mio codice
- (void)viewDidLoad
{
self.postParams =
[[NSMutableDictionary alloc] initWithObjectsAndKeys:
@"https://developers.facebook.com/ios", @"link",
@"https://developers.facebook.com/attachment/iossdk_logo.png", @"picture",
@"Facebook SDK for iOS", @"name",
@"build apps.", @"caption",
@"testing for my app.", @"description",
nil];
[self.postParams setObject:@"hgshsghhgsls" forKey:@"message"];
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
-(IBAction)Post{
AppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
[appDelegate openSessionWithAllowLoginUI:YES];
[FBRequestConnection startWithGraphPath:@"me/Mac" parameters:self.postParams HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection,id result,NSError *error) {
NSString *alertText;
if (error) {
alertText = [NSString stringWithFormat:@"error: domain = %@, code = %d, des = %d",error.domain, error.code,error.description];
}
else
{
alertText = [NSString stringWithFormat:@"Posted action, id: %@",[result objectForKey:@"id"]];
}
// Show the result in an alert
[[[UIAlertView alloc] initWithTitle:@"Result" message:alertText delegate:self cancelButtonTitle:@"OK!"
otherButtonTitles:nil]show];
}];
}
che cosa sto facendo male qui e ogni suggerimento sarà grande e questo nuovo SDK è una versione beta? o completo?
puoi pubblicare l'intera riga di errore? Fai un NSLog (@ "% @", errore); Poi vedi l'intera descrizione, perché sta lanciando l'errore 400. Oppure pubblica il messaggio dell'uscita di avviso ... – Fab1n
2012-08-30 14: 33: 05.225 NewFbLogin [1275: fe03] Errore: codice di stato HTTP: 400 – Ghouse
Scusa per questa domanda sciocca, ma hai un accesso valido e Facebook sessione? Forse segui questo tutorial: https://developers.facebook.com/docs/tutorials/ios-sdk-tutorial/authenticate/ – Fab1n