无需对话框即可将图像从iphone上传至facebook

无需对话框即可将图像从iphone上传至facebook,iphone,Iphone,我想从我的iphone向facebook发送我帐户的图像,而不显示fbconnect中的任何对话框。我想要一个简单的方法来测试它是否上传到facebook上 我用twitter api从我的iphone发送消息进行了测试,它的工作很好,只有几行代码 我贴在下面 NSMutableURLRequest *theRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://username:password@twi

我想从我的iphone向facebook发送我帐户的图像,而不显示fbconnect中的任何对话框。我想要一个简单的方法来测试它是否上传到facebook上

我用twitter api从我的iphone发送消息进行了测试,它的工作很好,只有几行代码

我贴在下面

NSMutableURLRequest *theRequest=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"http://username:password@twitter.com/statuses/update.xml"]
                                 cachePolicy:NSURLRequestUseProtocolCachePolicy 

                                 timeoutInterval: 60.0];
[theRequest setHTTPMethod:@"POST"];
[theRequest setHTTPBody:[[NSString stringWithFormat:@"status=%@", @"test message sends from iphone"] dataUsingEncoding:NSASCIIStringEncoding]];

NSURLResponse* response;
NSError* error;
NSData* result = [NSURLConnection sendSynchronousRequest:theRequest returningResponse:&response error:&error];
NSLog(@"%@", [[[NSString alloc] initWithData:result encoding:NSASCIIStringEncoding] autorelease]);
像wise一样,我想将文字和照片发送到facebook帐户?可能吗

fbconnect更多的是块和线,有人能帮我吗?一个简单的理解方法


提前感谢

有了新的OAuth Facebook API和新的Facebook ios sdk,我想没有这个对话框你是不行的。关键是,你的应用程序永远不会看到和存储用户凭据。如果随后关闭应用程序,并且登录对话框再次显示UIWebView使用的cookie集,则AFAIK会让您登录,而无需再次输入凭据