0

When testing the following URL string out in the Graph Explorer I get the expected return

me?fields=albums.limit(10){name,photos.limit(1){images}}

But when calling

FBRequestConnection.startWithGraphPath("me?fields=albums.limit(10){photos}", 
                                        parameters: nil, 
                                        HTTPMethod: "GET") 
                                        { (connection: FBRequestConnection!, 
                                        result: AnyObject!, 
                                        error: NSError!) -> Void in
    println(result)
}

It says that it's an unsupported URL. Do I need to access these properties via the 'parameters' option instead? I so, how do I go about that? I can't seem to get my head around it.

Any help is greatly appreciated

Chris

Chris
  • 7,830
  • 6
  • 38
  • 72

2 Answers2

0

I had similar problem when I tried to get my feed and found no answers. What I discovered is the URL format in Graph Explorer and iOS SDK is different.

iOS SDK don't like curly brackets, so your request for example should look like:

"me/albums?fields=photos"

In my case, that syntax works great. Unfortunately I have no idea how to specify the limit there.

//Edit: To use modifiers like limit, you can do that this way:

"me/albums?fields=photos&limit=10"
Przemek
  • 1
  • 2
0

Try referencing the albums fields like this:

"me?fields=albums.limit(10).fields(images)"

Nuno
  • 31
  • 2