3

如何在 Facebook 帖子墙消息(“标题”)中添加新行...\n 不接受任何其他方式...

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               StrImg, @"picture",
                               StrName, @"name",
                               strURL, @"link",
                               emailBody, @"caption",
                               actionLinksStr, @"actions",
                               nil];


[[delegate facebook] dialog:@"feed"
                  andParams:params
                andDelegate:self];
4

1 回答 1

0

请尝试以下代码可能会解决您的问题。

    - (IBAction)Publish {
        // Show the activity indicator.
        [self showActivityView];

        // Create the parameters dictionary that will keep the data that will be posted.
        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                       @"My test app", @"name",
                                       @"http://www.google.com", @"link",
                                       @"FBTestApp app for iPhone!", @"caption",
                                       @"This is a description of my app", @"description",
                                       @"Hello!\n\nThis is a test message\nfrom my test iPhone app!", @"message",              
                                       nil];

        // Publish.
        // This is the most important method that you call. It does the actual job, the message posting.
        [facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];

**Edit**

    [[delegate facebook] dialog:@"feed"
                          andParams:params
                        andDelegate:self];
}
于 2012-06-27T07:19:21.657 回答