2012-08-09 1 views
-1

도움이 필요합니다.
사용자가 응용 프로그램을 허용 한 후에 수행 할 작업이 없습니다. 내 pageLoad에서 URL에 코드 (Facebook에 의해 생성됨)가 있는지 확인하고 액세스 코드를 얻기 위해 문자열 코드로 다시 리디렉션하는지 확인합니다.
페이스 북이 액세스 토큰을 사용하여 다시 리디렉션하고 이제 토큰을 갖습니다.

다음 단계는 무엇입니까?페이스 북 OAuth가 내 액세스 토큰을 얻은 후에 - C# ASP.NET

...on pageload...
..........................
if (Request.QueryString["code"] != null && !Page.IsPostBack)
{
string code = Request.QueryString["code"];
string urlFinal = "https://graph.facebook.com/oauth/access_token?" +
"client_id=" + appID +
"&redirect_uri=" + redirectURL +
"&client_secret=" + appSecret +
"&code=" + code;
Response.Redirect(urlFinal);
}
else if (Request.QueryString["access_token"] != null)
string token = Request.QueryString["access_token"];
//AND NOW??

답변

1

and redirect again with the string code to get the access token.

해당 주소로 리디렉션하지마십시오 -이 앱의 비밀을 포함하고 있습니다!

대신 인증 문서에 설명 된대로 서버 측을 해당 엔드 포인트로 호출해야합니다.

What is the next step?

매우 당신이하고 싶은 것에 달려 있다고 생각하지 않습니까?

+0

어떻게 서버 측 호출을합니까? 나에게 "atuthentication 워드 프로세서"에 대한 링크를 보낼 수 있습니까? – oteal

+0

https://developers.facebook.com/docs/authentication/server-side/ – CBroe

+0

4 단계를 이해할 수 없습니다. 예제 코드를 보여줄 수 있습니까? – oteal