添加facebook登录
This commit is contained in:
parent
9dd3a0ab0d
commit
71361b3127
|
|
@ -301,18 +301,18 @@ const (
|
|||
func GetFacebookAccessTokenByCode(code string, redirectURI string, clientID string, clientSecret string) (proto.FacebookOAuthResponse, error) {
|
||||
var resp proto.FacebookOAuthResponse
|
||||
|
||||
url := "https://graph.facebook.com/v22.0/oauth/access_token"
|
||||
req := proto.FaceBookOAuthRequest{
|
||||
ClientID: clientID,
|
||||
ClientSecret: clientSecret,
|
||||
Code: code,
|
||||
RedirectURI: redirectURI,
|
||||
}
|
||||
url := "https://graph.facebook.com/v22.0/oauth/access_token" + "?client_id=" + clientID + "&client_secret=" + clientSecret + "&code=" + code + "&redirect_uri=" + redirectURI
|
||||
//req := proto.FaceBookOAuthRequest{
|
||||
// ClientID: clientID,
|
||||
// ClientSecret: clientSecret,
|
||||
// Code: code,
|
||||
// RedirectURI: redirectURI,
|
||||
//}
|
||||
var onlineReq proto.OnlineServerReq
|
||||
onlineReq.Type = "get"
|
||||
onlineReq.Url = url
|
||||
superTokens := GetRedisSetMembers("super_permission_tokens")
|
||||
onlineReq.Data = req
|
||||
//onlineReq.Data = req
|
||||
onlineReqBytes, _ := json.Marshal(onlineReq)
|
||||
headers := map[string]string{
|
||||
"token": superTokens[0],
|
||||
|
|
|
|||
Loading…
Reference in New Issue