简体   繁体   中英

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".

- (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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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