发布在墙上,但我没有看到任何附件。为什么?

时间:2010-12-22 13:18:46

标签: iphone cocoa-touch facebook

为什么我看不到@“Facebook正在运行的应用程序”标题?我使用facebook connect样本。

-(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:
                                 @"Head",  @"user_message_prompt",
                                 actionLinksStr, @"action_links",
                                 attachmentStr, @"attachment",
                                 nil];

  [_facebook dialog:@"feed"
          andParams:params
        andDelegate:self]; 
}

1 个答案:

答案 0 :(得分:1)

我在演示和演示文稿中注释了动作链接和附件部分。对_facebook对话框的调用也是一样的。我认为对话框的调用不会使用这些部分。我现在看源代码,因为那里有当前的facebook对话问题。