2012-10-19 3 views

답변

4

대답에 대 한 체크 아웃 https://github.com/facebook-csharp-sdk/facebook-windows8-sample

private async void GraphApiAsyncDynamicExample() 
{ 
    try 
    { 
     var fb = new FacebookClient("access_token"); 
     dynamic result = await fb.GetTaskAsync("me"); 

     // You can either access it this way, using the . 
     dynamic id = result.id; 
     dynamic name = result.name; 

     // if dynamic you don't need to cast explicitly. 
     ProfileName.Text = "Hi " + name; 

     // or using the indexer 
     dynamic firstName = result["first_name"]; 
     dynamic lastName = result["last_name"]; 

     // checking if property exist 
     var localeExists = result.ContainsKey("locale"); 

     // you can also cast it to IDictionary<string,object> and then check 
     var dictionary = (IDictionary<string, object>)result; 
     localeExists = dictionary.ContainsKey("locale"); 
    } 
    catch (FacebookApiException ex) 
    { 
     // handle error 
    } 
} 
+0

감사 Prabir와 C#을 SDK ... –

+0

나는이 시도,하지만 난 그것으로 이메일 ADRESS를 검색 할 수 없습니다입니다. 전자 메일 정보를 검색하는 다른 방법이 있습니까? – ChrisTTian667

관련 문제