나는 그것을 알아 냈다!
이미 친구 ID가 없다면 FBFriendPickerDelegate를 구현하십시오. http://developers.facebook.com/docs/howtos/filter-devices-friend-selector-using-ios-sdk/
그 다음 중요한 부분은, 친구의 벽에 게시하는 방법 : 그것을 파악에
- (void)facebookViewControllerDoneWasPressed:(id)sender
{
NSString* fid;
NSString* fbUserName;
// get facebook friend's ID from selection. just gets 1 right now.
for (id<FBGraphUser> user in friendPickerController.selection)
{
NSLog(@"\nuser=%@\n", user);
fid = user.id;
fbUserName = user.name;
}
//Make the post.
NSMutableDictionary* params = [[NSMutableDictionary alloc] initWithObjectsAndKeys:@"Join me!", @"message", @"http://itunes.apple.com/my-super-app", @"link", @"My Super App", @"name", nil];
NSLog(@"\nparams=%@\n", params);
//Post to friend's wall.
[FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/feed", fid] parameters:params HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error)
{
//Tell the user that it worked.
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Shared"
message:[NSString stringWithFormat:@"Invited %@! error=%@", fbUserName, error]
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
];
//Close the friend picker.
[self dismissModalViewControllerAnimated:YES];
}
축하 - 나쁘지 곧 비활성화하는 기능이있어, https://developers.facebook.com 참조/blog/post/2012/10/10/growing-quality-apps-with-open-graph/이렇게 할 수있는 유일한 방법은 앞으로 피드 대화 상자가 될 것입니다. – CBroe
정보를 제공해 주셔서 감사합니다. 친구의 벽을 대상으로하는 피드 대화 상자를 표시하는 방법을 알고 있습니까? – Curtis
물론, 문서에 나와 있습니다. https://developers.facebook.com/docs/reference/dialogs/feed/ - 매개 변수 섹션. – CBroe