from pyfbsdk import *
lastButtonIsCancel = True
btn, value = FBMessageBoxGetUserValue("Rename","Enter new name:", "", FBPopupInputType.kFBPopupString,"Ok","Cancel", None, 1, lastButtonIsCancel)
if btn == 1:
msg = "Name has been changed to %s" % (value)
else:
msg = "Name has not been changed, value has not been updated."
FBMessageBox("What happened:", msg, "Ok")
lastButtonIsCancel = False
btn, value = FBMessageBoxGetUserValue("Select Choices","Enter a value and select an action:", "", FBPopupInputType.kFBPopupString,"Do this","Do that", "Do it that way", 1, lastButtonIsCancel)
if btn == 1:
msg = "Do this with value %s" % (value)
elif btn == 2:
msg = "Do that with value %s" % (value)
else:
msg = "Do it that way with value %s" % (value)
FBMessageBox("What happened:", msg, "Ok")