Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got strange response #1

Open
ipconfiger opened this issue Nov 28, 2012 · 0 comments
Open

Got strange response #1

ipconfiger opened this issue Nov 28, 2012 · 0 comments

Comments

@ipconfiger
Copy link

i use this file in a flask app.

code like below:

@app.route("/oauth/fitbit")
def test():
    from fitbit import FitBit
    c=FitBit()
    if "oauth_token" not in request.args:
        url,oauth_token = c.GetRequestToken()
        return redirect(url)
    auth_token = request.args.get("oauth_token")
    pin = request.args.get("oauth_verifier")
    access_token = c.GetAccessToken(pin, Row(key=auth_token,secret=pin,callback=None))
    return "%s"%c.ApiCall(access_token,apiCall="/1/user/~/profile.json")

when get access_token it works ok,but when i access the api get_user_info,it return a xml header

<?xml version="1.0" encoding="UTF-8" ?>

not json object, what happening?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant