src/funkyquizbot/app.py
def encode_payload(prefix, data):
    """Return a <data> as a string, prefixed with <prefix>, for use as callback payload.
    Raises ValueError if content is invalid as a payload. E.g. length>1000."""
    r = """{}___{}""".format(prefix, json.dumps(data))
    # do some formal checks, as per
    # https://developers.facebook.com/docs/messenger-platform/send-api-reference/postback-button
    if len(r) > 1000:
        # postback content has max length of 1000
        raise ValueError
    return r
Return a <data> as a string, prefixed with <prefix>, for use as callback payload.
    Raises ValueError if content is invalid as a payload. E.g. length>1000.
Return a  as a string, prefixed with , for use as callback payload.
Raises ValueError if content is invalid as a payload.
Return a as a string prefixed with for use as callback payload . Raises ValueError if content is invalid as a payload .
def encode_payload(prefix, data):
    r = """{}___{}""".format(prefix, json.dumps(data))
    if len(r) > 1000:
        raise ValueError
    return r
def encode_payload ( prefix , data ) : r = """{}___{}""" . format ( prefix , json . dumps ( data ) ) if len ( r ) > 1000 : raise ValueError return r
Return a <data> as a string, prefixed with <prefix>, for use as callback payload.
Return a <data > as a string prefixed with <prefix > for use as callback payload .
"""Return a <data> as a string, prefixed with <prefix>, for use as callback payload.
    Raises ValueError if content is invalid as a payload. E.g. length>1000.""" # do some formal checks, as per # https://developers.facebook.com/docs/messenger-platform/send-api-reference/postback-button # postback content has max length of 1000
prefix
data