如何使用没有Facebook对话框方法的publish.stream从iPhone发布到Facebook

时间:2010-11-08 23:50:56

标签: iphone facebook sdk

我只想使用publish.stream从iPhone应用程序发布到Facebook,但不使用在调用Facebook对象的对话框方法时弹出的UIWebview。我该怎么做?

1 个答案:

答案 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];