Search code examples
iosfacebook-graph-apifacebook-ios-sdk

Can't get facebook pictures without token on iOS


I am able to access a user picture in a web browser without providing an access token, using the url: http://graph.facebook.com/ID/picture

I know it performs a redirection, but it works.

However, when trying to access the same url in an iOS HttpRequest, I get an "invalid_token" response.

Is it possible to get a picture from an ID, in iOS without a token? If so, how do I achieve this? If not, how is it possible using the web browser?

Thanks!


Solution

  • In case anyone else is stuck with this, apparently under some conditions you get an "invalid token" response from the facebook (graph api) if you use a POST and not a GET http request method. Switching to GET solved the problem for me.