简体   繁体   English

对话框中的图像更改

[英]Image change in dialogFeed facebook

How can I add my own picture for the feed. 如何添加自己的图片作为供稿。 I have it in my application folder. 我在应用程序文件夹中。 I have to give my image instead of @"http://www.facebookmobileweb.com/hackbook/img/facebook_icon_large.png". 我必须提供我的图片,而不是@“ 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];

 }

I want to have my image over there. 我想要那边的形象。 Please help. 请帮忙。

The 'picture' parameter only accepts urls of already hosted pictures. “图片”参数仅接受已托管图片的网址。

If you want to use a picture which is stored locally then you'll need to upload it first to a server and then use that url when posting to the feed. 如果要使用本地存储的图片,则需要先将其上传到服务器,然后在发布到提要中时使用该URL。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM