3

写真をアップロードし、ユーザーの友人を Facebook ユーザーのウォールにタグ付けする際に問題が発生しています。不明なエラーを返します

タグのパラメーターを削除すると、完璧に機能します。

これは、写真を投稿してユーザーにタグを付けるために使用するコードです

NSMutableArray *chunks = [[NSMutableArray alloc] init];

NSMutableDictionary *tagDict=[[NSMutableDictionary alloc]init];

for(int i=0; i < appDelegate.listFriend.count ;i++) {
      NSDictionary *friend = [appDelegate.listFriend objectAtIndex:i];
      NSString *type = [NSString stringWithFormat:@"%@",[friend objectForKey:@"type"]]; 
      if([type intValue] == 1) {

                    [tagDict setValue:[friend objectForKey:@"id"] forKey:@"tag_uid"];
                    [chunks addObject:tagDict];
      } 
}

[photoParams setObject:[chunks JSONString]  forKey:@"tags"];

 //test posting facebook's image's url
NSString *imagePath = urlPhoto;
NSURL *imageUrl = [NSURL URLWithString:imagePath];
NSData *imageData = [NSData dataWithContentsOfURL:imageUrl];

NSMutableDictionary *photoParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                                    message, @"message", imageData, @"source", nil];              

[appDelegate.facebook requestWithGraphPath:@"/me/photos" andParams:photoParams andHttpMethod:@"POST" andDelegate:appDelegate.self];

その問題を解決するのを手伝ってください。すべてのアイデアを歓迎します。

ありがとう

4

1 に答える 1