gpt4 book ai didi

iphone - 在 Facebook 墙上添加照片

转载 作者:行者123 更新时间:2023-12-03 21:10:03 25 4
gpt4 key购买 nike

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com