gpt4 book ai didi

ios - Pinterest IOS SDK getBoardPins 响应代码=-1011 "Request failed: bad request (400)"

转载 作者:行者123 更新时间:2023-11-30 13:48:26 24 4
gpt4 key购买 nike

我收到了错误的请求返回

 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)")
}

并且能够成功收到响应

关于ios - Pinterest IOS SDK getBoardPins 响应代码=-1011 "Request failed: bad request (400)",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34625285/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com