Schlechte URL, wenn Sie die Anfrage mit NSURL

Ich versuche zu verlangen, diese Art von URL in das iPhone SDK 4.0 (access-token leicht modifiziert, weil Sie nicht wirklich brauchen, um es zu sehen):

https://graph.facebook.com/me?sdk=ios&sdk_version=2&access_token=123902817987|8cb9e8408d2685cef853cd80.9-747882379|UGu5NvcAHiXuGEGzkq&format=json&limit=40&until=1286619821

Aber ich bekam diese Meldung:

Failed with error: Error Domain=NSURLErrorDomain Code=-1000 "bad URL" UserInfo=0x9e657a0 {NSUnderlyingError=0x9e656a0 "bad URL", NSLocalizedDescription=bad URL}

Wenn ich kopiert und eingefügt werden in Safari oder Chrome, funktioniert es. Ich habe versucht, ersetzen | mit %| wie vorgeschlagen hier aber nicht funktioniert.

Bittet, es aus dem terminal sieht wie folgt aus:

curl https://graph.facebook.com/me/statuses?sdk=ios&sdk_version=2&access_token=9999955817987|8ab9e8408d2685cef.3-747882379|UGuxWDuM&format=json&limit=40&until=1286619821
[1] 16190
[2] 16191
[3] 16194
[4] 16195
[5] 16196
[2]   Done                    sdk_version=2
[4]-  Done                    format=json
$ -bash: UGu5NvcAHiXuGEGzkq3KP8xWDuM: command not found
-bash: 8ab9e8408d2685cef853cd80.3-747882379: command not found
{"error":{"type":"OAuthException","message":"An active access token must be used to query information about the current user."}}
[1]   Done                    curl https://graph.facebook.com/me/statuses?sdk=ios
[3]-  Exit 127                access_token=9999955817987 | 8ab9e8408d2685cef.3-747882379 | UGuxWDuM
[5]+  Done                    limit=40

Irgendwelche Ideen?

Schreibe einen Kommentar