Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Built-in NLP Support #89

Closed
TomVoxsen opened this issue Jan 18, 2018 · 3 comments
Closed

Built-in NLP Support #89

TomVoxsen opened this issue Jan 18, 2018 · 3 comments
Assignees

Comments

@TomVoxsen
Copy link

Hi Casper,

Could you add get and set functions for handling messages when built-in NLP is enabled?
https://developers.facebook.com/docs/messenger-platform/built-in-nlp

This did the trick for me

/home/tom/projects/laravel-fb-messenger/src/Messages/ReceiveMessage.php:
   63       * @var array
   64       */
   65:     private $nlp = [];
   66  
   67      /**
   ..
  245  
  246      /**
  247:      * Set nlp
  248       *
  249:      * @param $nlp
  250       *
  251       * @return $this
  252       */
  253:     public function setNlp($nlp)
  254      {
  255:         $this->nlp = $nlp;
  256          return $this;
  257      }
  258      /**
  259:      * Get nlp
  260       *
  261       * @return array
  262       */
  263:     public function getNlp()
  264      {
  265:         return $this->nlp;
  266      }
  267  

/home/tom/projects/laravel-fb-messenger/src/Messages/Receiver.php:
   78                      )
   79                      ->setAttachments(Arr::get($message, 'message.attachments', []))
   80:                     ->setNlp(Arr::get($message, 'message.nlp', []));
   81              }
   82 

Cheers

@CasperLaiTW
Copy link
Owner

Cool, I will add in the weekend :)

Thanks

@TomVoxsen
Copy link
Author

Cheers dude!

@CasperLaiTW
Copy link
Owner

I released new version v1.6.0

If any issue, please send to me.

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants