ios - Getting Photos From Facebook -


i use functions user's photos:

func getfacebookphotos() {     var request = fbsdkgraphrequest(graphpath:"/me/photos?fields=from,tags,images", parameters: nil);     println("started request")     request.startwithcompletionhandler(self.handler) }  func handler(connection : fbsdkgraphrequestconnection!, result : anyobject!, error : nserror!) {     if error == nil {          println(result)          if (result["paging"]! != nil) {             var after = result["paging"]!["cursors"]!["after"]! as! string             var path = "/me/photos?fields=from,tags,images&after=" + after              var request = fbsdkgraphrequest(graphpath: path, parameters: nil);             println("started request")             request.startwithcompletionhandler(self.handler)         }     } else {         println(error)     } } 

the problem 30 photos when know user has more photos that.

how can of photos?

you need pass in limit parameter:

limit : number of individual objects returned in each page. note upper limit, if there not enough remaining objects in list of data, less number returned. edges have upper maximum on limit value, performance reasons. return correct pagination links if happens.

https://developers.facebook.com/docs/graph-api/using-graph-api/v2.4#paging


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -