Facebook oAuth 400 Error from ASP.NET application - oauth

ASP.NET application performing oAuth with Facebook. This code was working fine until a few days ago and now suddenly throws 400 errors. Cannot seem to find out why - the code has remained unchanged (verified using SVN). Can anyone help with might be the cause?
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The remote server returned an error: (400) Bad Request.
Source Error:
Line 231: {
Line 232:
Line 233: webRequest.GetResponse().GetResponseStream().Close();
Line 234:
Line 235: responseReader.Close();

No. They URLdecode the response BEFORE sending it back to you now. So if you were already decoding it at your server its double decoded and when you send it back to Facebook it throws an invalid token exception.
This was really shitty of facebook. They should have atleast warned the developers.

If anyone finds this page because they are/were getting a 400 error with facebook the problem for me was that my redirect URL ended with a /.
So, for your redirect URL:
http://www.website.com/oauth/callback/ - Bad
http://www.website.com/oauth/callback - Good
I hope that helps someone..

Related

Error 403 - Forbidden error when I'm trying to access ?WSDLs from browser in WSO2

Dears, I'm trying to access this URL through my browser: https://localhost:9443/services/OAuth2TokenValidationService?wsdl
But I'm getting error 403
I followed everything based on this doc,
please someone help me.
If you set <HideAdminServiceWSDLs>false</HideAdminServiceWSDLs> and restart the server this should work.
First understand what the 403 error means.
The error (HTTP 403 Forbidden) means that the browser was able to connect to the website, but it does not have permission to view the webpage.
So, check the user under which the process is running. If that user is not having the right permissions, then this error will pop out.
Kill the process id, and start the server with the correct user who is having the right permissions.

integrating ccavenue i am getting 10001 error code invalid request encrypted request invalid or not present

I am getting 1001 error code while integrating cc-avenue using Asp.Net MVC.
It also showing that Encrypted request is invalid/not present.
I am not able to trace this error in cc-avenue error code list.
please help me.

Getting error while taking access of my personal drive rails

connection = GoogleDrive.login("vg123#gmail.com","acbshaka" )
*** GoogleDrive::AuthenticationError Exception: Authentication failed for vg123#gmail.com: Response code 404 for post https://www.google.com/accounts/ClientLogin: https://developers.google.com/accounts/docs/AuthForInstalledApps
Please Help me I just want to upload csv file to my personal drive from rails code on server side in background process.................Please help me
Use OAuth instead of it, login is deprecated so long back

Getting 403 error while running search api using twitter4j

Hi i am trying to collect data from twitter search Api using Twitter4j. Every thing is working fine but after certain no. of calls to the Api it is throwing the following error.
403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following).
message - Missing or invalid url parameter
code - 195
Using thread.sleep i am calling Api every 1 min. so at the max it can have 60 calls. But the limit is 350 with authentication, then also i am getting this error.
Please help me out i am very new to this. Thanks in advance.
What are you sending in the DM. From now on it seems that if your message contains an URL the DM will be rejected:
https://support.twitter.com/articles/14606-posting-or-deleting-direct-messages

Error occurred while sending a direct message or getting the response

I am using "InMemoryTokenManager" to tweet messages from my application.
The method "auth.BeginAuthorize();" returns an exception as "Error occurred while sending a direct message or getting the response.".
Can somebody help me out of this problem.
Thx- Satya
This error message maybe seen when you do not have your Return Url set correctly in your Twitter App that can be found after logging to Twitter here: https://dev.twitter.com/apps
As for me, it was popping out because of checking authorization twice. After removing second call to check authorization, it starts work OK.

Resources