This commit is contained in:
richboo111
2022-08-18 16:36:11 +08:00
parent 75679bf4d1
commit 8b6fe6e92b
3 changed files with 5 additions and 2 deletions

View File

@@ -3,15 +3,18 @@ package tiktok
import (
"errors"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
)
// 获取抖音登录授权2
func (a *API) GetTiktokOauth(code string) (*TiktokOauthResone, error) {
globals.SugarLogger.Debug("初始code=============", code)
tokenReq := make(map[string]interface{}, 3)
tokenReq["appid"] = a.GetAppID()
tokenReq["code"] = code
tokenReq["secret"] = a.GetSecret()
tokenReq["anonymous_code"] = ""
result, err := a.AccessAPI2(GetTiktokOauth, tokenReq)
if err != nil {
return nil, err