首页 > 解决方案 > 使用 sdk python 回复所有消息页面 facebook

问题描述

conv = pagefacebook.get_object("me/conversations") msg​​ = pagefacebook.get_object(conv["data"][0]["id"] + "/messages") print(conv)

for el in msg["data"]:
    content = pagefacebook.get_object(el["id"])  # adding the field request
    print(content["id"])

    args = {"fields": "message"}
    msgtext = pagefacebook.get_object("/" + content["id"], **args)
    print(msgtext)

    callSendAPI("106045308371301", "this is aloha")
    pagefacebook.put_object("106045308371301", "messages", message="hello, world")
    break

标签: facebooksdk

解决方案


推荐阅读