botman / driver-facebook

BotMan Facebook Messenger Driver
MIT License
71 stars 73 forks source link

When using the regular optin button, there is no `user_ref` variable #51

Closed TheDeadCode closed 6 years ago

TheDeadCode commented 6 years ago

Here is the webhook contents:

[2017-12-04 15:21:11] production.INFO: got something {"object":"page","entry":[{"id":"705168819692680","time":1512418869682,"messaging":[{"recipient":{"id":"705168819692680"},"timestamp":1512418869682,"sender":{"id":"1528804580544761"},"optin":{"ref":"WvL8Xkg1W2mwYBat"}}]}]}

and the error

[2017-12-04 15:21:11] production.ERROR: Undefined index: user_ref {"exception":"[object] (ErrorException(code: 0): Undefined index: user_ref at /vendor/botman/driver-facebook/src/FacebookDriver.php:314)