Posting picture from iphone to facebook wall

99封情书 提交于 2020-01-13 07:01:08

问题


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

The URL appears to be pointing somewhere valid, but the picture doesn't show up. 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!


回答1:


According to facebook, any image posted to a stream has to be web accessible, so what I wanted to do just isn't possible. The only way to get this to work is to upload the picture somewhere first, then use that URL.




回答2:


If you want to get URL it's better to use ALAssetsLibrary method: writeImageToSavedPhotosAlbum:orientation:completionBlock:

It returns the a saved image URL in its callback block: ALAssetsLibraryWriteImageCompletionBlock. Should note that it's only available from iOS 4.0



来源:https://stackoverflow.com/questions/5137285/posting-picture-from-iphone-to-facebook-wall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!