Get Started button appears but posback not coming to server - facebook

Based on this documentation Get Started Button - Messenger Platform I have created a get started button. I got this result from CURL
{
"result": "Successfully added new_thread's CTAs"
}
The button appears properly, but when clicking on the button the postback is not triggering in my webhook.
I have all the following fields in app settings
message_deliveries, message_echoes, message_reads, messages,
messaging_account_linking, messaging_checkout_updates,
messaging_optins, messaging_payments, messaging_postbacks,
messaging_referrals
Other bot text processing works properly.
Anyone faced this issue?
----[EDIT]----
It seems there are multiple page access token assigned to the hook, for each page access token we need to set the menu.
I have deleted and re-created the app then it started working

Related

Facebook Send Dialog in iframe doesn't seem to work

I am having issues using the Facebook send dialog. If I open this window in a new browser, everything works:
https://www.facebook.com/dialog/send
?app_id=[My_App_Id]
&redirect_uri=https%3A%2F%2Fwww.example.com%2Fcallback
&link=https%3A%2F%2Fexample.com%2Fimage.jpg
So by doing that, I am able to send a message just fine. However, I need this to be in an iframe, which according to the send dialog documentation, this should work. So I then do this:
https://www.facebook.com/dialog/send
?app_id=[My_App_Id]
&display=iframe
&redirect_uri=https%3A%2F%2Fwww.example.com%2Fcallback
&link=https%3A%2F%2Fexample.com%2Fimage.jpg
Doing so, I get the following error:
API Error Code: 102
API Error Description: Session key invalid or no longer valid
Error Message: Iframe dialogs must be called with a session key
I find it a little strange that I can do this with a popup, but they require a session key for iframe. But even so, that isn't a problem. Because I have already gotten an access_token. So, this should work then:
https://www.facebook.com/dialog/send
?app_id=[My_App_Id]
&display=iframe
&redirect_uri=https%3A%2F%2Fwww.example.com%2Fcallback
&link=https%3A%2F%2Fexample.com%2Fimage.jpg
&access_token=[MY_OAUTH_ACCESS_TOKEN]
The access token was obtained from calling /v12.0/dialog/oauth, and I have confirmed that the access_token is valid:
However, I now get this message:
This Content Isn't Available Right Now
When this happens, it's usually because the owner only shared it with a small group of people, changed who can see it or it's been deleted.
So now this really makes no sense. I can send this link just fine if I use a popup with NO access_token present. But to set the display to iframe, I must include the token, which is fine, but it doesn't like the token for some reason?
It is also worth noting that this behaves the same way regardless if the Facebook app is in development mode or live mode. In development mode, all of the permissions should work for my test users. So it seems very unlikely that this is a permissions issue?
Anybody have any insight on this at all?

Facebook Custom Tabs

I understand how to create the app for the custom tab. However when I try to layout the next step it comes back with an error message. Can someone help me to properly layout the "With URL Redirects".
I know to put the Id number where is says YOUR APP ID and I have also placed the website in the "YOUR URL" position but it doesn't work. I have watched several videos and they all seem to be prior to the latest FB update.
The problem I am having seems to be coming from the setup for this code below that leads you to the Add Page Tab Dialog prompt. facebook.com/dialog/pagetab? app_id=YOUR_APP_ID &redirect_uri=YOUR_URL When I insert the "Your App ID" and Your URL" and hit enter I am receiving a Facebook Error message that says:
This dialog has been passed a bad parameter. API Error Code: 100 API
Error Description: Invalid parameter Error Message: Requires valid
redirect URI.

Firebase Analytics: Event Parameters not Logged on FB Console

I have events successfully being logged to the Firebase console however their associated parameters are not being shown.
My goal is to track which products and brands in my app are getting clicked on most. With the debug view I can see the view_item events being triggered and the parameters being successfully passed however in the console I cannot see the parameters such as in the demo project's level completed section. I'm using swift 4 for iOS on the simulator and on my iPhone X.
I have the parameters enabled by clicking the 3-dots in the event window and enabling them however after 48 hours I see the events being logged, but no parameters attached.
Here is where I log the events:
Analytics.logEvent(AnalyticsEventAddToCart, parameters: [AnalyticsParameterItemName : name, AnalyticsParameterPrice : price, AnalyticsParameterItemBrand : seller, AnalyticsParameterCurrency : "€"])
Parameters enabled and
No parameter data being shown
Have I logged it incorrectly or am I doing something wrong on the console side of things? Much apprecited, Allen <3
Yesterday for Xcode reasons I uninstalled and reinstalled the app on my device and that seems to have worked! Didn't change any code.

getting " cross-site request forgery (CSRF) attack thwarted " error even after clearing the browser cache

I am using OWASP to prevent information leakage on my application. But this not working properly as expected.
I logged in to my application and done some random clicks on the tabs in the application. Then I cleared the web browser history and cookies .When I click on any tab after this I will get an pop up screen by saying the session got expired please login again and it redirects me to the login screen when I click on the “ok” button (Till this it worked fine ) . But when I login again and clicking on the tab that used in the last session after deleting the cookies, I get the error “cross-site request forgery (CSRF) attack ...” (this is something weird). If am Clicking on any other tabs I am not getting any error and it works fine
this is a snippet of my OWASP.properties file :-
#org.owasp.csrfguard.action.Empty=org.owasp.csrfguard.action.Empty
org.owasp.csrfguard.action.Log=org.owasp.csrfguard.action.Log
org.owasp.csrfguard.action.Log.Message=potential cross-site request forgery (CSRF) attack thwarted (user:%user%, ip:%remote_ip%, uri:%request_uri%, error:%exception_message%)
#org.owasp.csrfguard.action.Invalidate=org.owasp.csrfguard.action.Invalidate
org.owasp.csrfguard.action.Redirect=org.owasp.csrfguard.action.Redirect
org.owasp.csrfguard.action.Redirect.Page=/ourUI/csrfError.jsp
#org.owasp.csrfguard.action.Redirect.Page=/OLDUI/error/error.jsp
#org.owasp.csrfguard.action.RequestAttribute=org.owasp.csrfguard.action.RequestAttribute
#org.owasp.csrfguard.action.RequestAttribute.AttributeName=errMsg
org.owasp.csrfguard.action.Rotate=org.owasp.csrfguard.action.Rotate
#org.owasp.csrfguard.action.SessionAttribute=org.owasp.csrfguard.action.SessionAttribute
#org.owasp.csrfguard.action.SessionAttribute.AttributeName=Owasp_CsrfGuard_Exception_Key
I have uncommented the following line and checked
org.owasp.csrfguard.action.Invalidate=org.owasp.csrfguard.action.Invalidate
This time I got the error when I click first time on the tab which I have used in last session (followed the same procedure as above) Second time onwards it worked fine. Can anyone please help to find why this error I am getting? Do I need to make any other changes on this file?

404 when post submitted; found when directly called

I have a ColdFusion enabled form (for validation) submitting to a separate page. When this form is submitted it is showing me a 404 on the action page, yet when I directly load the action url into the address bar it shows up (errors appear, but that's ok). This is by far one of the most odd issues I have encountered.
Form page: http://www.jefferson.edu/population_health/_archive/contact_me.cfm
Action page: http://www.jefferson.edu/population_health/_archive/contact_action.cfm
Even if I try passing the form variables via URL it gives me a 404.
My gut is that there is another service on that machine that is trying to take over the request whenever you submit data and binding it to another webserver...which, of course, it can't find the right page based on it's own webroot.
If you click http://www.jefferson.edu/population_health/_archive/contact_me.cfm, it loads fine and returns 200 header with IIS as the server, but if you click http://www.jefferson.edu/population_health/_archive/contact_me2.cfm it throws a 404, as expected, but it's properly handled with a custom 404 and the header response is still IIS. But if you click http://www.jefferson.edu/population_health/_archive/contact_me.cfm?foo=bar, it returns an ApacheSling default 404 and header information saying the server is "Day-Servlet-Engine/4.1.12".
Your page is posting to the page contact_action.cfm ... in your question you indicate that the proper page should be "mailaction.cfm".
If the action page is actually mailaction.cfm then you simply need to change the action attribute of your cfform.