Pinterest SDK authenticate permission fail

泄露秘密 提交于 2019-12-25 04:37:08

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!