페이스 북의 액세스 토큰 400 잘못된 요청 나는 페이스 북 accessToken을 검색하는 코드를 다음 사용하고
그러나string url = "https://graph.facebook.com/oauth/access_token?" +
"client_id={0}" +
"&redirect_uri={1}" +
"&client_secret={2}" +
"&code={3}";
url = string.Format(url, clientId, redirectUri.EncodeUrl(), clientSecret, code);
//Create a webrequest to perform the request against the Uri
WebRequest request = WebRequest.Create(url);
try
{
//read out the response as a utf-8 encoding and parse out the access_token
using (WebResponse response = request.GetResponse())
{
using (Stream stream = response.GetResponseStream())
{
//string urlRedirects = response.ResponseUri.ToString();
Encoding encode = Encoding.GetEncoding("utf-8");
if (stream != null)
{
StreamReader streamReader = new StreamReader(stream, encode);
string accessToken = streamReader.ReadToEnd().Replace("access_token=", "");
streamReader.Close();
response.Close();
return accessToken;
}
}
}
}
catch
{
return null;
}
나는 항상 내가 코드 100 "잘못된 매개 변수를"확인
{
"error": {
"message": "Error validating verification code.",
"type": "OAuthException",
"code": 100
}
}
이 모호한 오류 메시지를 수신하고 나를 전혀 의미하지 않는다.
누구나 비슷한 문제가 있습니까?
시험해보기 : http://stackoverflow.com/questions/8240626/facebook-oauth-error-validating-verification-code-sometimes-happen – Thomas
@Thomas, 불행히도 같은 문제가 아닙니다. –