In my messenger platform app, when I make this request:
GET https://graph.facebook.com/v2.8/${psid}?access_token=PAGE_ACCESS_TOKEN
(to get users public info based on their PSID), sometimes Facebook returns this error:
'There is an error when trying to get the user\'s info from Messenger:\nError: failed [400] {"error":{"message":"(#100) Invalid parameter","type":"OAuthException","code":100,"fbtrace_id":"FpUUkuX0egc"}}'
I have no idea why this happens, because when I saw the error then I manually made the same request (by using POSTMAN), I got the correct result (user public profile) with no error.
I struggled with this issue for a long long time and finally managed to find the problem:
In one of my JSON's parameters, I had a value with an unknown character:
"יאל בן רפל בהר"
instead of
"יאל בן רפל בהר"
This character was removed by POSTMAN, and was later found out as a tab character (\t
). Other, unknown characters were also removed.
The solution was to remove this value from the JSON along with other characters that may cause a bad request (such as tab):
value = value.Replace("\t", "").Replace(" ", "");
(This is a C# example)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With