我想使用python将消息发送给linkedin中的多个朋友。
来自文档:http://code.google.com/p/python-linkedin/
使用这个可以发送。来自python的linkedin:无法发送多条消息
result = api.SendMessage("This is a subject", "This is the body", ["ID1", "ID2", "ID3"])
但我无法使用它。任何人都可以告诉我什么是ID1? ID2?等等?
我想使用python将消息发送给linkedin中的多个朋友。
来自文档:http://code.google.com/p/python-linkedin/
使用这个可以发送。来自python的linkedin:无法发送多条消息
result = api.SendMessage("This is a subject", "This is the body", ["ID1", "ID2", "ID3"])
但我无法使用它。任何人都可以告诉我什么是ID1? ID2?等等?
您只能发送第一级连接消息。所以,为了获得有效的ID,我猜测代码看起来像这样:
>>> connections = api.Getconnections() # connections is a list of Profile instances
>>> connections
>>> [<linkedin.linkedin.Profile object at 0x1a3d510>]
>>> connections[0].id
>>> 'js6vz2-D6x'
>>> result = api.SendMessage("This is a subject", "This is the body", [connections[0].id, connections[1].id, connections[2].id])
它们是您希望发送信息的人的ID。而不是['ID1', 'ID2', 'ID3']
,请尝试使用send_yourself = True
来确定您所做的工作。所以它将是:
result = api.SendMessage("This is a subject", "This is the body", send_yourself = True)
意味着你不能发送没有连接到连接列表中的消息? – sam 2011-06-18 04:19:54