post_data = {}
if media_ids is not None:
post_data["media_ids"] = list_to_csv(media_ids)
-
+
return bind_api(
api=self,
path='/statuses/update.json',
self.request_token = self._get_request_token(access_type=access_type)
return self.oauth.authorization_url(url)
except Exception as e:
- raise
raise TweepError(e)
def get_access_token(self, verifier=None):
'x_auth_username': username,
'x_auth_password': password})
- print(r.content)
credentials = parse_qs(r.content)
return credentials.get('oauth_token')[0], credentials.get('oauth_token_secret')[0]
except Exception as e:
def parse_error(self, payload):
error = self.json_lib.loads(payload)
- if error.has_key('error'):
+ if 'error' in error:
return error['error']
else:
return error['errors']