0

如何为提要添加自己的图片。我在我的应用程序文件夹中有它。我必须提供我的图片而不是 @"http://www.facebookmobileweb.com/hackbook/img/facebook_icon_large.png"。

- (void)apiDialogFeedUser {
    currentAPICall = kDialogFeedUser;
    SBJSON *jsonWriter = [[SBJSON new] autorelease];

    // The action links to be shown with the post in the feed
    NSArray* actionLinks = [NSArray arrayWithObjects:[NSDictionary dictionaryWithObjectsAndKeys:
                                                       @"Get Started",@"name",@"http://m.facebook.com/apps/hackbookios/",@"link", nil], nil];
     NSString *actionLinksStr = [jsonWriter stringWithObject:actionLinks];
     // Dialog parameters
      NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                               @"I'm using the Hackbook for iOS app", @"name",
                               @"Hackbook for iOS.", @"caption",
                               @"Check out Hackbook for iOS to learn how you can make your iOS  apps social using Facebook Platform.", @"description",
                               @"http://m.facebook.com/apps/hackbookios/", @"link",
                               @"http://www.facebookmobileweb.com/hackbook/img/facebook_icon_large.png", @"picture",
                               actionLinksStr, @"actions",
                               nil];

   HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
      [[delegate facebook] dialog:@"feed"
        andParams:params
        andDelegate:self];

 }

我想把我的形象放在那里。请帮忙。

4

1 回答 1

3

'picture' 参数仅接受已托管图片的 url。

如果您想使用本地存储的图片,则需要先将其上传到服务器,然后在发布到提要时使用该 URL。

于 2012-06-02T11:21:57.630 回答