swift - Pinterest IOS SDK getBoardPins response Code=-1011 "Request failed: bad request (400)" -


i'm getting bad request return on

 pdkclient.sharedinstance().getboardpins(boardid, fields: ["image", "description"], withsuccess: { (responseobject :pdkresponseobject!) -> void in              print(responseobject.pins().first!.descriptiontext)              })  { (err :nserror!) -> void in                 print("error nserror: \(err)")         } 

passing boardid from:

override func prepareforsegue(segue: uistoryboardsegue, sender: anyobject?) {         if let dvc = segue.destinationviewcontroller as? pincollectionviewcontroller {            dvc.boardid = selectedboard.identifier     } 

and can't figure out why? know board id correct , tried hard coding it. i've been authenticated...

from sdk:

/**  *  list of pins given board. response can used  *  bext page of pins.  *  *  @param boardid      id of board  *  @param fields       pin fields returned api  *  @param successblock called when api call succeeds  *  @param failureblock called when api call fails  */ - (void)getboardpins:(nsstring *)boardid               fields:(nsset *)fields          withsuccess:(pdkclientsuccess)successblock           andfailure:(pdkclientfailure)failureblock; 

i changed fields to:

pdkclient.sharedinstance().getboardpins(boardid, fields: ["id", "image", "note"], withsuccess: { (responseobject :pdkresponseobject!) -> void in          print(responseobject.pins().first!.descriptiontext)          })  { (err :nserror!) -> void in             print("error nserror: \(err)")     } 

and able receive response


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -