How to Refresh the token that i got from google oauth 2.0 in iOS

后端 未结 1 2056
野性不改
野性不改 2021-01-12 06:57

I am making an iOS application that uses the user\'s google account to get data from his youtube account and show them .... first step is done using the gtm2 to authenticate

1条回答
  •  醉梦人生
    2021-01-12 07:06

    You are missing a = in your format string.

    Change

    NSString *post =[[NSString alloc] initWithFormat:@"client_secret=%@&grant_type=refresh_token&refresh_token=%@&client_id%@",kGoogleClientSecretKey,kRefreshToken,kGoogleClientIDKey];
    

    to

    NSString *post =[[NSString alloc] initWithFormat:@"client_secret=%@&grant_type=refresh_token&refresh_token=%@&client_id=%@",kGoogleClientSecretKey,kRefreshToken,kGoogleClientIDKey];
    

    0 讨论(0)
提交回复
热议问题