这可能是一个新手问题,但仍然... 我在我的iPad应用中使用Facebook SDK时遇到了一些问题:当我使用[facebook dialog:@"feed" andDelegate:self];
来显示对话框时,我看不到任何可以更改我想要分享的标题、内容或URL的方法。
在他们的演示应用中,Facebook有以下代码:
- (IBAction)publishStream:(id)sender {
SBJSON *jsonWriter = [[SBJSON new] autorelease];
NSDictionary* actionLinks = [NSArray arrayWithObjects:[NSDictionary
dictionaryWithObjectsAndKeys: @"Always Running",@"text",@"http://itsti.me/",
@"href", nil], nil];
NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
NSDictionary* attachment = [NSDictionary dictionaryWithObjectsAndKeys:
@"a long run", @"name",
@"The Facebook Running app", @"caption",
@"it is fun", @"description",
@"http://itsti.me/", @"href", nil];
NSString *attachmentStr = [jsonWriter stringWithObject:attachment];
NSMutableDictionary* params = [NSMutableDictionary
dictionaryWithObjectsAndKeys:
@"Share on Facebook", @"user_message_prompt",
actionLinksStr, @"action_links",
attachmentStr, @"attachment",
nil];
[_facebook dialog:@"feed"
andParams:params
andDelegate:self];
}
然而,当我点击publishStream按钮时,那些字符串都没有显示在对话框中! :S
我做错了什么吗?我在演示应用程序中所更改的只有Facebook kAppId和URL Scheme。