Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/115.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Pinterest IOS SDK getBoardPins响应代码=-1011“;请求失败:错误请求(400)";_Ios_Swift_Afnetworking_Pinterest - Fatal编程技术网

Pinterest IOS SDK getBoardPins响应代码=-1011“;请求失败:错误请求(400)";

Pinterest IOS SDK getBoardPins响应代码=-1011“;请求失败:错误请求(400)";,ios,swift,afnetworking,pinterest,Ios,Swift,Afnetworking,Pinterest,我收到了一个错误的请求返回 PDKClient.sharedInstance().getBoardPins(boardID, fields: ["image", "description"], withSuccess: { (responseObject :PDKResponseObject!) -> Void in print(responseObject.pins().first!.descriptionText) }) { (e

我收到了一个错误的请求返回

 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)")
        }
从以下地址传递boardID:

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        if let dvc = segue.destinationViewController as? PinCollectionViewController {
           dvc.boardID = selectedBoard.identifier
    }
我不知道为什么?我知道我的董事会ID是正确的,并努力编码它。我已经被认证了

从SDK:

/**
 *  Get a list of pins for the given board. The response can be used to get
 *  the bext page of pins.
 *
 *  @param boardId      ID of the board
 *  @param fields       The pin fields that will be returned by the api
 *  @param successBlock Called when the API call succeeds
 *  @param failureBlock Called when the API call fails
 */
- (void)getBoardPins:(NSString *)boardId
              fields:(NSSet *)fields
         withSuccess:(PDKClientSuccess)successBlock
          andFailure:(PDKClientFailure)failureBlock;

我将字段更改为:

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)")
    }
并且能够成功地收到回复