Get Friends returns JSON decoding error


When I call the api to Get Friends of a specified user, I’m get back the following error:

api.GetFriends( user_obj, cursor = -1)
TwitterError: json decoding

There’s no problem with the user object that I’m passing to the API. Any suggestions on how to work around this? Thanks!


Actually, I fixed my problem: If you pass the user_obj_id to api.GetFriends() instead of user_obj itself, it works perfectly.