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

add Feature:fb server response handling #27

Closed
wants to merge 1 commit into from

Conversation

kapilkd13
Copy link

On sending a message fb server sends either normal response containing receipient_d and message_id or
error message which need to be handled. It can also tell us about the possible
problem and we should act accordingly.
response is received in FbBotApp's call method.
https://developers.facebook.com/docs/messenger-platform/send-api-reference#errors
referenced from above link

fb server sends either normal response containing recpt id and messageid or
error message which need to be handled. It can tell us about the possible
problem.
@wittfabian
Copy link
Contributor

This request needs an discussion. The changes affect the syntax a lot.

@wittfabian
Copy link
Contributor

#83

@kapilkd13
Copy link
Author

@wittfabian You are right. Now this code would affect syntax a lot. Actually this PR was sitting idle for a long time. I used it, it worked fine for me and adding this would be a good feature addition.

@a-fawzy
Copy link
Contributor

a-fawzy commented Apr 8, 2017

I do not understand how this feature would affect syntax a lot?

What about adding private member to the FbBotApp Class something like:
private $handleMessage;
add it to the constructor as an optional parameter with false value as default.
in the send function check it,

  • if false do the same as current
  • if true do the new behavior of handling errors.

@wittfabian
Copy link
Contributor

@a-fawzy Your idea is good, but currently not part of the pull request. The current implementation affects the response of the "call"-function. Anyone would have to change their current handling of the returned object.

@nasirkhan
Copy link

@wittfabian liked the idea of releasing a stable version and add this feature. can we set a tentative date of release?

@wittfabian
Copy link
Contributor

No! The current implementation affects the response of the "call"-function. Anyone would have to change their current handling of the returned object.

The idea of @a-fawzy is good, but currently not part of this pull request!

@jason-engage
Copy link
Contributor

jason-engage commented May 23, 2017

I really think we need to add these Read receipts. What's the solution here? Should I take a look at this?

@kapilkd13
Copy link
Author

I would have tested it again, but I am currently not having fb bot setup that I was working with. I am ready to help.

@wittfabian
Copy link
Contributor

wittfabian commented May 24, 2017

I would prefer a solution with something like private $handleMessage

@wittfabian wittfabian closed this Jun 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants