Reputation: 1394
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.
Upvotes: 0
Views: 213
Reputation: 164167
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.
Upvotes: 3