1
youtube.liveChatMessages().insert
返回400
錯誤代碼,原因unexpectedPart
。YouTube發送實時聊天信息不起作用
這是在Google API瀏覽器上收到的相同響應。
def send_message(youtube):
send_message_response = youtube.liveChatMessages().insert (
part = "snippet",
body = dict (
snippet = dict(
liveChatId = result_chatId,
type = "textMessageEvent",
textMessageDetails = dict(
messageText = "hello world"
)
),
authorDetails = dict(
displayName = "blabla"
)
)
).execute()
print "%s" % (send_message_response)
錯誤響應接收。