2011-09-21 2 views
0

내 페이지를 방문하는 페이스 북 아이디하세요 나는 istructions 아래 다음 해요 : https://developers.facebook.com/docs/authentication/signed_request/나는 사람들의 이름을 얻기 위해 필요한

필자를 작성한 다음 코드를

string _authorizationUrl = string.Format("https://www.facebook.com/dialog/oauth?client_id={0}&redirect_uri={1}", FB_APPID, Server.UrlEncode(FB_CANVAS_PAGE)); 
string _signedRequest = Request["signed_request"] as string; 

string[] _valuesInRequest = _signedRequest.Split(new char[] {'.'}, 2); 

string _stringToDecode = _valuesInRequest[1].Replace("-_","+/"); 

System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding(); 
System.Text.Decoder decoder = encoding.GetDecoder(); 

byte[] _byteToDecode = Convert.FromBase64String(_stringToDecode); 
int charCount = decoder.GetCharCount(_byteToDecode, 0, _byteToDecode.Length);  
char[] _decodedChar = new char[charCount]; 
decoder.GetChars(_byteToDecode, 0, _byteToDecode.Length, _decodedChar, 0);     
string result = new String(_decodedChar); 
임 페이스 북 로그인을 이름 aabout없는 정보와

{"algorithm":"HMAC-SHA256","issued_at":1316602539,"page":{"id":"XXXXXX","liked":false,"admin":false},"user":{"country":"it","locale":"it_IT","age":{"min":21}}} 

: 그리고이 결과를 얻을. 왜? 아무도 날 도와 줄 수있어?

인해 개인 정보 보호 문제에 사용할 수,이 정보는 아니며, 아마 없을 것이다 결코 당신에게

답변

1

감사합니다. 누가 Facebook 페이지를 방문하는지에 대한 정보를 얻는 유일한 방법은 사용자가 애플리케이션을 인증하고 승인하도록하는 것입니다. 그런 다음/my에서 그래프 api를 호출하여 ID와 이름을 얻을 수 있습니다.

관련 문제