本文介绍了如何在脸书上做壁纸,图像存储在iPhone上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个应用程序,我必须在Facebook的墙上发布图像。
现在问题是我使用GraphAPI的脸书,我必须传递照片的链接,但我在我的iPhone上有照片,而不是在任何服务器上。
那么如何在没有URL的图像和其他参数的情况下张贴墙壁?
I have an application in which i have to post image on Wall of facebook.
Now problem is i used GraphAPI facebook and i have to pass link of photo but i have photo in my iPhone and not on any server.
So how do i post wall with image and other parameters without URL of image?
推荐答案
您可以使用NSURLConnection ASIHttpRequest库从url下载图像。
You may use NSURLConnection ASIHttpRequest library for downloading the images from a url.
You will have to do the following:
1. Create a NSUrlConnection and implement the delegate methods
2. Pass the url in your request and you will get the data in -(void)connectionDidFinishLoading: (NSURLConnection *)connection
3. You can then create a UIImage from this data using UIImage *image = [[UIImage alloc] initWithData:activeDownloadData];
这篇关于如何在脸书上做壁纸,图像存储在iPhone上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!