4
我想用在iOS 5 用戶的Twitter框架將選擇使用哪個帳戶共享,因此應用程序將分享他們使用選定的帳戶。TWRequest performRequestWithHandler沒有錯誤,但沒有發生
但whem份額傳遞到performRequestWithHandler
沒有發生的的error
回報null
我的代碼:
for (int i = 0; i < [_accountsArray count]; i++) {
//searching for a selected account
if ([[[_accountsArray objectAtIndex:i] username] isEqualToString:[self getUserName]]) {
actualUser = [_accountsArray objectAtIndex:i];
TWRequest *sendTweet = [[TWRequest alloc] initWithURL:[NSURL URLWithString:@"https://upload.twitter.com/1/statuses/update_with_media.json"]
parameters:nil
requestMethod:TWRequestMethodPOST];
[sendTweet addMultiPartData:[text dataUsingEncoding:NSUTF8StringEncoding] withName:@"status" type:@"multipart/form-data"];
ACAccountStore *account = [[ACAccountStore alloc] init];
[sendTweet setAccount:[account.accounts objectAtIndex:i]];
NSLog(@"%@",sendTweet.account);
[sendTweet performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
NSLog(@"responseData: %@\n", responseData);
NSLog(@"urlResponse: %@\n", urlResponse);
NSLog(@"error: %@",error);
}];
}
}
任何人都可以幫我嗎?
謝謝
這也開始發生在我身上。出於某種原因,在iPod touch iOS5上它可以正常工作,但在iPhone 4 iOS6上卻不行。檢查網址是否正確:'的https:// api.twitter.com/1.1 /狀態/ update_with_media.json'對'的https:// upload.twitter.com/1 /狀態/ update_with_media.json' – cleverbit