Reputation: 31
I have been struggling with the simple task of authenticating with the ios-pdk. This has worked for me in the past but it is not consistent. I have followed all the instructions I can find: set up a re-direct uri and I am using the the latest XCode 7 with Swift 2. I am concerned it may be related to my latest upgrade. My call looks like this:
let permission = [PDKClientReadPublicPermissions]
PDKClient.sharedInstance().authenticateWithPermissions(permission,
withSuccess: { (responseObject :PDKResponseObject!) -> Void in
print("success PDKResponseObject: \(responseObject)")
}) { (err :NSError!) -> Void in
print("error NSError: \(err)")
}
Over the past few days, sometimes I receive a success and other days I receive an internal server error! Has anyone seen this behavior?
Domain=com.alamofire.error.serialization.response Code=-1011 "Request failed: internal server error (500)" UserInfo={com.alamofire.serialization.response.error.response= { URL: https://api.pinterest.com/v1/me/?access_token=[access_token_here]&fields=counts%28pins%2Clikes%2Cboards%29%2Cid%2Cbio%2Clast_name%2Ccreated_at%2Cusername%2Cimage%2Cfirst_name } { status code: 500
Thanks, Anita
Upvotes: 2
Views: 835
Reputation: 31
I realized that unauthorized error I was receiving was due to the fact that the account I was testing with was not listed as a collaborator for my app.
Upvotes: 0
Reputation: 139
i think this may have been fixed with this pull request: https://github.com/pinterest/ios-pdk/commit/4386ef09ee988de1f73511552fb3e35d721962b6
Upvotes: 1