내 애플리케이션에서 Facebook으로 게시물을 공유하려고합니다. '사진'키에 이미지 링크를 입력하면 잘 작동하지만 내 사진 중 하나를 공유하면 앱이 다운됩니다. 이것은 내가 이미지는 10 * 10 이미지 및 오류가 Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIImage length]: unrecognized selector sent to instance 0xab7b900'
입니다facebook의 앱에서 이미지를 공유하려고 할 때 앱이 작동을 멈 춥니 다.
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"Magic Photo from Abracadabra Snap!", @"name",@"Edit photos, move objects around,remove photo bombs", @"caption",@"Use automatic object detector to select objects or make your own custom selection.Remove the unwanted objects or photobomb,or move objects around.Do crazy stuff with your pictures , save and share with friends.", @"description",@"http://www.arkhitech.com/abracadabra/", @"link",tempImageForFacebookShare, @"picture",nil];
// Show the feed dialog
[FBWebDialogs presentFeedDialogModallyWithSession:nil parameters:params handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error)
{
if (error)
{
// An error occurred, we need to handle the error
// See: https://developers.facebook.com/docs/ios/errors
NSLog([NSString stringWithFormat:@"Error publishing story: %@", error.description]);
}
else {
if (result == FBWebDialogResultDialogNotCompleted)
{
// User cancelled.
NSLog(@"User cancelled.");
}
else
{
// Handle the publish feed callback
NSDictionary *urlParams = [self parseURLParams:[resultURL query]];
if (![urlParams valueForKey:@"post_id"])
{
// User cancelled.
NSLog(@"User cancelled.");
}
else
{
// User clicked the Share button
NSString *result = [NSString stringWithFormat: @"Posted story, id: %@", [urlParams valueForKey:@"post_id"]];
NSLog(@"result %@", result);
}
}
}
}];
을 사용하고있는 코드입니다. 이 문제에 대해 안내해주십시오
작동하지 않습니다. 그것의 허가 문제가 있지만 전체 OAuth 과정을 통과하고 싶지 않다. –
-1 Api는 NSArray를 기대하지 않지만 NSString을 기대한다. – lootsch