gpt4 book ai didi

iphone - 如何将图像发布到 facebook 墙上?

转载 作者:行者123 更新时间:2023-11-28 22:52:56 27 4
gpt4 key购买 nike

使用此 Tutorail 我成功登录到 Facebook http://www.raywenderlich.com/1626/how-to-post-to-a-users-wall-upload-photos-and-add-a-like-button-from-your-iphone-app但我没有使用 iOS 版 facebook 的经验。

- (IBAction)rateTapped:(id)sender {
NSURL *url = [NSURL URLWithString:@"YOur Image url"];
NSData *data = [NSData dataWithContentsOfURL:url];
UIImage *img = [[UIImage alloc] initWithData:data];
[variables setObject:img forKey:@"picture"];
FbGraphResponse *fb_graph_response = [fbGraph doGraphPost:@"/me/photos"
withPostVars:variables];
}

但在这里我很困惑,我们如何传递图像 url,bcz 我的图像在同一页面上,而且当我使用这段代码时,它给了我以下四个错误。

enter image description here

我运气不好。怎么了?提前致谢

最佳答案

请看这篇文章 - How to share or post by mail, twitter and facebook from the current application?在此您将找到如何将 UIImage 共享到 FacebookTwitterEmail

关于iphone - 如何将图像发布到 facebook 墙上?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11482863/

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