Comments (11)
I know this issue is closed, but as an FYI to future readers, be sure when subscribing to the page to enable the messaging_postbacks
event.
To receive messages and other events sent by Messenger users,
the app should enable webhooks integration.
Selected events:
message_deliveries, messages, messaging_optins, messaging_postbacks
When I initially setup my bot and webhooks, I only enabled the messages
event (as shown in the README image).
from facebook-messenger.
The logs should definitely say something – if you've registered a hook on :postback
it should run that code, and otherwise it should say that it's ignoring the event. Did you remember to subscribe to the page? Also, please help us to help you by sharing your code.
from facebook-messenger.
Good catch, @dthyresson! I just got that image from Facebook's documentation, but it'd be good to update it with something that has all the right settings.
from facebook-messenger.
A quick reply is not a postback, @vedant1811. Here's the documentation on postbacks, and the documentation on quick replies.
from facebook-messenger.
Totally unrelated question, but is there a way to retrieve the sender's first name on either the message or postback method?
from facebook-messenger.
Did you figure the first question out...?
from facebook-messenger.
And yes, you can use the Graph API to query user data.
from facebook-messenger.
Ok thanks, yeah everything is working now!
from facebook-messenger.
Hello. I am still facing the same issue :(
After sending this, I get the 2 quick reply options:
optin.reply(
text: "Welcome #{user.name}! Should I notify you of job updates via messages?",
quick_replies: [
{
content_type: 'text',
title: 'Yes, definitely',
payload: 'notifications-yes'
},
{
content_type: 'text',
title: 'No',
payload: 'notifications-no'
}
]
but the, after selecting the 'yes. definitely' option, nothing happens in the postback callback:
Bot.on :postback do |postback|
postback_debug = {
sender: postback.sender,
payload: postback.payload,
}
Rails.logger.debug "New postback: #{postback_debug.to_s}"
case postback.payload
when 'notifications-yes'
postback.reply(text: 'Great')
when 'notifications-no'
postback.reply(text: 'Okay :(')
else
raise "Cannot handle postback payload: #{postback.payload}"
end
end
However, I do get a message callback with :text=>"Yes, definitely"
, as seen in my logs.
from facebook-messenger.
I'm facing the same issue, it only occurs when I do broadcast
from facebook-messenger.
I'm facing the same issue, Postbacks not Working for a particular facebook page but it is working for all other page. If am i doing any wrong with page setting pls help me
from facebook-messenger.
Related Issues (20)
- Message tag field name discrepancy? HOT 2
- Multiple bots HOT 3
- How to find password HOT 1
- global "include Facebook::Messenger" bad style and possibly dangerous? HOT 1
- https://jsbin.com/ihunin/edit?html,js,output
- `hexdigest': no implicit conversion of nil into String (TypeError) HOT 1
- webhook OK 200 response
- Help
- Instagram Messenger support
- Dynamic graph api version
- Dynamic graph api version HOT 1
- (#283) Requires manage_pages permission to manage the object
- (#100) Cannot set persistent menu because your app is not set as the primary app for the page. HOT 1
- Messenger
- Lol
- To subscribe to the feed field, one of these permissions is needed: pages_manage_metadata HOT 1
- Messengers
- typo in instruction
- Not support event feed ? HOT 1
- You
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from facebook-messenger.