- (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 墙。
任何人都可以帮助我......
提前致谢......
最佳答案
您可以使用 UIImagePickerController 及其委托(delegate)方法访问 iPhoto 图库项目的 URL。
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
当用户选择照片时,URL 将位于字典中的 UIImagePickerControllerMediaURL
关于iphone - 在 Facebook 墙上添加照片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3793970/