def post_text_list(fbid, messages=[]):
""" Sends a serie of messages from a list of texts. The
messages will be sent in the same order as the list items.
:usage:
>>> # Set the user fbid and the list of texts to send.
>>> fbid = "<user page scoped id>"
>>> texts = [
"Hi, Todays forecast is:",
"Morning: Sunny - 27C",
"Afternoon: Sunny - 25C",
"Night: Cloudy - 18C"
]
>>> response = fbbotw.post_text_list(
fbid=fbid,
messages=texts
)
:param str fbid: User id to send the text list.
:param list messages: A list of messages to be sent.
:return: A list of `Response objects <http://docs.python-\
requests.org/en/master/api/#requests.Response>`_\
for every message sent.
"""
responses = []
for msg in messages:
responses.append(post_text_message(fbid=fbid, message=msg))
return responses
评论列表
文章目录