简体   繁体   English

将图片从iPhone发布到Facebook墙

[英]Posting picture from iphone to facebook wall

I'm using Facebook Connect for iOS to post a picture, taken in an app, to facebook wall, possible using the local file URL, according to another post: adding photo on facebook wall 根据另一篇文章:我使用Facebook Connect for iOS将在应用程序中拍摄的照片发布到Facebook墙上,可能使用本地文件URL,这是在Facebook墙上添加照片

The URL appears to be pointing somewhere valid, but the picture doesn't show up. URL似乎指向有效的位置,但是图片没有显示。 Verified that it does work with a web link. 验证它确实可以通过网络链接使用。 Anyone have an idea why this isn't working for local files? 有人知道为什么它不适用于本地文件吗? Would I need permissions beyond regular wall posts? 除了常规的墙贴帖子,我还需要其他权限吗?

Help! 救命!

According to facebook, any image posted to a stream has to be web accessible, so what I wanted to do just isn't possible. 根据facebook的说法,发布到信息流上的任何图像都必须可以通过网络访问,所以我想做的只是不可能的。 The only way to get this to work is to upload the picture somewhere first, then use that URL. 使其生效的唯一方法是先将图片上传到某个位置,然后再使用该URL。

If you want to get URL it's better to use ALAssetsLibrary method: writeImageToSavedPhotosAlbum:orientation:completionBlock: 如果要获取URL,最好使用ALAssetsLibrary方法: writeImageToSavedPhotosAlbum:orientation:completionBlock:

It returns the a saved image URL in its callback block: ALAssetsLibraryWriteImageCompletionBlock . 它在其回调块中返回保存的图像URL: ALAssetsLibraryWriteImageCompletionBlock Should note that it's only available from iOS 4.0 请注意,它仅在iOS 4.0中可用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM