问题
I am trying to pin an image to pinterest. However, when I tried to authenticate the user, it fails.
I am calling the following code on button click, which takes me to pinterest app and the authentication dialog is shown,
[[PDKClient sharedInstance] authenticateWithPermissions:@[PDKClientReadPublicPermissions,
PDKClientWritePublicPermissions,
PDKClientReadPrivatePermissions,
PDKClientWritePrivatePermissions,
PDKClientReadRelationshipsPermissions,
PDKClientWriteRelationshipsPermissions]
withSuccess:^(PDKResponseObject *responseObject)
{
PDKUser *user = [responseObject user];
NSLog(@"%@ authenticated!", user.firstName);
} andFailure:^(NSError *error) {
NSLog(@"authentication failed: %@", error);
}];
Also nothing prints in the console. I am unable to access the responseObject inside the block.
when I click okay, the authentication fails.
I have no idea where I could be wrong. I followed the steps mentioned in the pinteret/Developers . Can anyone guide me in the right way?
回答1:
Probably there is an error in the callback URL you are passing and /or which is provided by you in the app settings. Check that Url, as a recommendation.
来源:https://stackoverflow.com/questions/34886806/pinterest-sdk-authenticate-permission-fail