이전에 addThis 및 공유 키트를 사용했지만 문제가 생겨서 지쳤습니다. 나는 마침내 페이스 북의 sdk 자료를 검토하고 작동하도록했습니다. 나 사용자가 자신의 벽에 게시 말할 수 있도록 나는 ...Facebook sdk와 사용자가 공유 한 후 메서드 호출
-(IBAction)fbPost:(id)sender
{
if (![facebook isSessionValid]) {
NSArray *permissions = [[NSArray alloc] initWithObjects:
@"user_likes",
@"read_stream",
@"publish_stream",
nil];
[facebook authorize:permissions];
}
SBJSON *jsonWriter = [SBJSON new];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
@"Always Running",@"text",@"http://itsti.me/",@"href", nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"Name", @"name",
@"Test Caption", @"caption",
@"This sure is fun", @"description",
@"http://www.test.com/", @"href", nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@“xxxxxxxxxx",@"app_id",
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
@"Here is the message",@"message",
nil];
AppDelegate *aDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
[aDelegate.facebook dialog:@"stream.publish" andParams:params andDelegate:self];
}
내 질문은 ... 사용자의 벽에 게시하려면이 s의 방법이되어 사용하고 있습니다? 예를 들어 "Facebook에서 공유해 주셔서 감사합니다"라는 메시지를 게시하고 싶습니다.
내가 원했던 것은 완벽했다. –