How to download a file uploaded to a private Facebook group using Graph API

ε祈祈猫儿з 提交于 2020-01-04 04:22:06

问题


Facebook now allows us to upload arbitrary types of files to Facebook groups, which is great. I am writing a single-sign-on iOS app, which accesses such a private group the user belongs to, and download those files.

I was able to acquire the URL to those files using Graph API, which look like this:

http://www.facebook.com/download/444555666777888/foo.bar

(If I type this URL to a browser, the browser downloads it as long as I have logged in to Facebook as me from that browser, but will fail otherwise -- Facebook has a good security feature).

I can't pass this URL to graph API because it's not part of graph (which always starts with https://graph.facebook.com/), but I can't download it using a regular NSURLConnection because of the lack of access token.

Is there any proper way to download those files? Or, is there any particular HTTP header I need to set when downloading such a file using NSURLConnection?

来源:https://stackoverflow.com/questions/10721747/how-to-download-a-file-uploaded-to-a-private-facebook-group-using-graph-api

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