本文整理汇总了C#中Facebook.FacebookClient.ParseDialogCallbackUrl方法的典型用法代码示例。如果您正苦于以下问题:C# FacebookClient.ParseDialogCallbackUrl方法的具体用法?C# FacebookClient.ParseDialogCallbackUrl怎么用?C# FacebookClient.ParseDialogCallbackUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facebook.FacebookClient
的用法示例。
在下文中一共展示了FacebookClient.ParseDialogCallbackUrl方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RequestView_OnNavigationCompleted
private async void RequestView_OnNavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args)
{
if (args.Uri.DnsSafeHost == "wp.qmatteoq.com")
{
sender.Visibility = Visibility.Collapsed;
AppContent.Visibility = Visibility.Visible;
FacebookClient client = new FacebookClient(AccessToken);
dynamic result = client.ParseDialogCallbackUrl(args.Uri);
if (result.error_code == null)
{
var items = (IDictionary<string, object>) result;
ObservableCollection<FacebookUser> invitedFriends = new ObservableCollection<FacebookUser>();
foreach (KeyValuePair<string, object> value in items)
{
if (value.Key != "request")
{
string query = string.Format("/{0}", value.Value);
dynamic user = await client.GetTaskAsync(query);
FacebookUser facebookUser = new FacebookUser();
facebookUser.FullName = user.name;
invitedFriends.Add(facebookUser);
}
}
Friends.Visibility = Visibility.Visible;
FriendsHeader.Visibility = Visibility.Visible;
Friends.ItemsSource = invitedFriends;
}
else
{
MessageDialog dialog = new MessageDialog("The user has canceled the operation");
await dialog.ShowAsync();
}
}
}