在Facebook墙上添加照片 [英] adding photo on facebook wall
本文介绍了在Facebook墙上添加照片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
- (void)postToWall {
FBStreamDialog* dialog = [[[FBStreamDialog alloc] init] autorelease];
dialog.userMessagePrompt = [NSString stringWithFormat: subjectTitle]; //subjectTitle works here but not as name where i need it.
NSString *src = @"http://www.sample.com/image.png";
NSString *name = storyLink; //<---------------------------------works with storyLink but not subjectTitle. I need subjectTitle to work here
NSString *href = storyLink;
NSString *attachment = [NSString stringWithFormat:@"{\"name\":\"%@\",\"media\":[{\"type\":\"image\", \"src\":\"%@\", \"href\":\"%@\"}]}", name, src, href];
dialog.attachment = attachment;
[dialog show];
}
我想添加图片从 http://www.sample.com/image.png 的照片库到facebook墙。
i want to add image from photo library instred of http://www.sample.com/image.png to the facebook wall.
任何人都可以给我帮助....
can anyone provides me help ....
提前致谢......
Thanks in advance ......
推荐答案
您可以使用UIImagePickerController及其委托方法访问iPhoto图书馆项目的URL。
You can access the URL's of the iPhoto library items using the UIImagePickerController and its delegate method.
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
当用户选择照片时,网址将位于字典 UIImagePickerControllerMediaURL
When the user picks a photo the URL will be in the dictionary under the key UIImagePickerControllerMediaURL
这篇关于在Facebook墙上添加照片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文