|
|
|
@ -133,7 +133,8 @@ class TwitterNetworkData(NetworkData):
|
|
|
|
|
|
|
|
|
|
# Twitter encodes a lot of HTML entities, which are not good when |
|
|
|
|
# you want to *display* then (e.g., "<" returns to us as "<"). |
|
|
|
|
# So we convert this here. |
|
|
|
|
# So we convert this here. Interfaces need to worry about converting |
|
|
|
|
# them if it becomes a problem. |
|
|
|
|
self.message = _unhtml(data['text']) |
|
|
|
|
|
|
|
|
|
return |
|
|
|
@ -405,8 +406,9 @@ class Connection(NetworkBase):
|
|
|
|
|
|
|
|
|
|
def repost(self, message): |
|
|
|
|
"""Repost a message.""" |
|
|
|
|
body = {'id': message.id} # Force a body to make it a POST. |
|
|
|
|
data = self._request('/statuses/retweet.json', body=body) |
|
|
|
|
body = urllib.urlencode({'id': message.id}) |
|
|
|
|
resource = '/statuses/retweet/%d.json' % (message.id) |
|
|
|
|
data = self._request(resource, body=body) |
|
|
|
|
return TwitterNetworkData(data) |
|
|
|
|
|
|
|
|
|
def delete_message(self, message): |
|
|
|
@ -435,4 +437,4 @@ class Connection(NetworkBase):
|
|
|
|
|
def can_repost(self, message): |
|
|
|
|
"""Twitter ignores retweets from the user.""" |
|
|
|
|
return not (message.username == |
|
|
|
|
self._options[self.NAMESPACE]['username']) |
|
|
|
|
self._options[self.NAMESPACE]['username']) |
|
|
|
|