我只想使用publish.stream从iPhone应用程序发布到Facebook,但不使用在调用Facebook对象的对话框方法时弹出的UIWebview。我该怎么做?
答案 0 :(得分:2)
SBJSON *jsonWriter = [[SBJSON alloc] init]; NSDictionary *attchmentDic = [NSDictionary dictionaryWithObjectsAndKeys:
@"Foobar",@"name",
nil]; NSString *attachmentStr = [jsonWriter stringWithObject:attchmentDic]; NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"Bla-bla",@"message",
attachmentStr, @"attachment",
nil];
[_facebook requestWithMethodName:@"stream.publish"
andParams:params
andHttpMethod:@"POST"
andDelegate:self]; [jsonWriter release];