Quantcast
Channel: MacOS Coders
Viewing all articles
Browse latest Browse all 20

Uploading Images To Facebook Wall Using FBConnect

$
0
0

We can upload images to Facebook users wall using the following FBConnect code:


FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.delegate = self;
dialog.userMessagePrompt = "Image Upload Sample";
dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"Anish\","
"\"href\":\"http://www.macoscoders.com/\",\"description\":\"This is an example to upload image to FB\","
"\"media\":[{\"type\":\"image\","
"\"src\":\"http://www.macoscoders.com/images/anish.jpg\","
"\"href\":\"http://www.macoscoders.com/\"}],"
"\"properties\":{\"another link\":{\"text\":\"Home page\",\"href\":\"http://www.macoscoders.com/\"}}}"]];
[dialog show];

Make sure you have implemented the correct delegate methods for FBConnect to know the status of posting to wall
Cheers..!


Viewing all articles
Browse latest Browse all 20

Trending Articles