Merge pull request #216 from soulcramer/add_twitter_login
Fixed the "url must not contain a query string" error
This commit is contained in:
commit
cfca5b76fb
@ -5,6 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/url"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/aerogo/aero"
|
"github.com/aerogo/aero"
|
||||||
@ -79,7 +80,8 @@ func InstallTwitterAuth(app *aero.Application) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fetch user data from Twitter
|
// Fetch user data from Twitter
|
||||||
resp, err := config.Get(nil, tokenCred, "https://api.twitter.com/1.1/account/verify_credentials.json?include_email=true&skip_status=true", nil)
|
params := url.Values{"include_email": {"true"}, "skip_status": {"true"}}
|
||||||
|
resp, err := config.Get(nil, tokenCred, "https://api.twitter.com/1.1/account/verify_credentials.json", params)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ctx.Error(http.StatusBadRequest, "Failed requesting user data from Twitter", err)
|
return ctx.Error(http.StatusBadRequest, "Failed requesting user data from Twitter", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user