Botpress can't connect to messenger - chatbot

I am making my first bot on botpress. On trying to connect botpress with messenger by inputing app id, app secret and access token through UI, I am getting forllowing errors :
An error has been returned by Facebook API. Status: 400 (Bad Request) (#100) callback_url should represent a valid URL.
Even when manually input these values in botpress-messenger.config.yml same error is shown.
but the fallback url gets validated on messenger developer console.
What am I doing wrong?

Try checking if your domain is existing. Also, remove https

Related

Error while making a subscription on webhooks on facebook app developer platform

I am not able to make webhooks new page subscription its giving me an error in the callback url saying "(The URL couldn't be validated. Response does not match challenge, expected value = '736926330', received=')", i am not having a domain name as same as my app name.
You need a server the supports https and script code running on it to authenticate the subscription.
Facebook Messenger Platform Developers Complete Guide

Facebook Graph API - Whitelisting

QUESTION EDITED TO BE MORE SPECIFIC:
When attempting to read 'views' field for a user's public videos using the Graph API:
https://graph.facebook.com/v2.5/facebook/videos?access_token=<token>&fields=views
Using my application's access token, I receive the following error message:
(#3) App must be on whitelist
However, making the same request using the facebook Graph Explorer (with a Graph Explorer access token) the data is returned correctly.
Does anyone know how to request for an application to be adding to the said whitelist?When trying to extract data from the Facebook Graph API I get the message: "(#3) App must be on whitelist"
Thanks
Just go to your facebook app's setting>advanced setting and in 'Server IP Whitelist' field. mention the IP from which you are making request to Graph API

Facebook Login - dialog/oauth giving error

When I try to access my Facebook app without being logged into Facebook, I'm getting an error. If I'm already logged into Facebook, I get directed to the application normally, but without being logged in
Using the example for server-side CSRF on this page, my site generates a "state" variable to store in the session and redirects the user to the following URL:
http://www.facebook.com/dialog/oauth?client_id=[APP_ID]&redirect_uri=[APP_URL]&state=[RANDOM_NUMBER]
All I'm getting by way of an error message is
Error
An error occurred. Please try later.
With no clear indication what's gone wrong, where, or why.
The app is running on a live server, with the domain name and path matching what's specified in the Facebook app control panel.
If your receiving the Error 'An error occurred. Please try later.' on the Facebook login page then i would suggest you to verify the value for the parameter 'redirect_uri'. the value supplied in the above url should match with the one set for the facebook app in the spp settings page.
Had faced a similar problem during my initial days. Hope this helps.

OAuth is breaking, but only when users are coming from HTTP, HTTPS works fine

I'm trying to get an auth token for a user using OAuth.
Everything works fine and I'm getting the token wonderfully when the users tries to access the app using HTTPS, meaning from https://apps.facebook.com/APPNAME . However, if the user is coming from HTTP (which most users are) I get a 400 error from facebook when trying to get:
https://graph.facebook.com/oauth/access_token?code=XXXXXXXX-XXXXXX-XXXXXXXXX&client_secret=YYYYYYYYYYYYYYYYYYYYY&redirect_uri=https://fb.myapp.com/fb_connect/&client_id=ZZZZZZZZ
{
"error": {
"message": "Error validating verification code.",
"type": "OAuthException"
}
}
Why is this happening?
We have experienced a similar issues since Facebook began to require SSL certificates on apps.
OAuth 2.0 works correctly with PHP SDK 3.1.1. If you are using earlier versions, go to GIT HUB and upgrade.
However, even with 3.1.1, signed requests return NULL from http:// when Facebook users have not enabled secured browsing.
Solution is to 1. use javascript to add a redirect at the top of your script or 2. add a (a href =https://your app url*) link somewhere.
There is a major flaw in FB as all of FB links in the left side page menu are http:// when user has not enabled secured browsing.
I had the same problem but I found out that it was because the user did not confirm the e-mail address yet. So you won't get any token for a new user that has not confirmed his email address. Just in case, I thought it was useful for this topic.
A problem for me with the "Error validating verification code" were the redirect_uri.
Between the request for user authentication (returnung the code) and app authorization/authentication should be the same.

Facebook access token graph API call result in a bad request error

We have a Canvas Facebook App and for some time we get a strange error for some of the users that are trying to install (allow) our Facebook app. I mention this is happening only for some of the users and not for all! The error we are getting is "The remote server returned an error: (400) Bad Request." The graph API call we putted in a try catch block and this is what the logs says when I searched over them to see what went wrong. The graph API call is:
https://graph.facebook.com/oauth/access_token?client_id=XXX&redirect_uri=XXX&client_secret=XXX&code=code_received_from_facebook.
We received the code from Facebook and append it to the graph API call from above but it seems that for some users this is not working. Our redirect_uri parameters contains an URL to our Facebook App and contains also some parameters (example: http://apps.facebook.com/our_application_URL?cid=xxx&surveyid=xxx&messageid=xxx).
xxx = some values.
Did some of you confront with this kind of strange behavior? Working for some users but for other is not working? We are using the same code so nothing change between a successful installation and a unsuccessful installation.
Thank you for your help in advance!
Now that Facebook require SSL for applications your "redirect_uri" need to be https (i.e https://apps.facebook.com/myapp/), otherwhise you will get "Bad Request".
You probably got the error for only the users that had forced SSL but not the rest.