views:

15

answers:

0

hello, I want to send some message to LinkedIn user, through its API. here is a doc for it - http://developer.linkedin.com/docs/DOC-1044 , but i have no clues - how should i pass that XML? i.e., for getting messages i'm using next code (and it works good):

consumer = oauth.OAuthConsumer(LinkedinSocialView.CONSUMER_KEY, LinkedinSocialView.CONSUMER_SECRET)
oauth_request = oauth.OAuthRequest.from_consumer_and_token(consumer,
token=access_token, http_method="GET", http_url="https://api.linkedin.com/v1/people/~/mailbox", parameters={"message-type": "message-connections"})
oauth_request.sign_request(oauth.OAuthSignatureMethod_HMAC_SHA1(), consumer, access_token)
url = oauth_request.to_url()
connection.request(oauth_request.http_method, url)
response = connection.getresponse()
s = response.read()
print s

thanks for any help!