Skip to content

Send a Basic Text can not tto send from pyfacebook #250

Open
@Antonkoch999

Description

@Antonkoch999

I try to send text message with help this enpount: https://developers.facebook.com/docs/messenger-platform/send-messages/

but if I do

        data = {"recipient": {"id": recipient_id}, "message": {"text": message}}
        return GraphAPI(
            app_id=settings.FACEBOOK_APP_ID,
            app_secret=settings.FACEBOOK_APP_SECRET_KEY,
            access_token=access_token,
            version=self.version,
        ).post_object(object_id=page_id, connection="messages", data=data)

I have a problem, recipient is empty, because if I send data=data, {"recipient": {"id": recipient_id}} become recipient=id

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions