我如何从Facebook获取所有用户个人资料信息(如名字,姓氏,电子邮件等)
我已经下载了FB SDK但没有获取配置文件信息的示例.
首先,这是我的最小版本项目的链接.
我正在尝试在我的Pivot页面内创建一个tinder swipe卡类型的效果.在参考Lightstone Carousel之后能够创建一个C#并在XAML其中工作Grid.
现在我的问题是自定义控件应该进入一个Pivot元素.由于pivot的默认操作会覆盖我的控件在TOUCH设备上的滑动操作.如何向下冒泡到我的自定义控件.根据@Romasz的回答,
无法Touch在Win 10应用程序中找到.
任何其他具有类似效果的控制建议也将受到赞赏.
XAML
<Pivot>
<PivotItem>
<Grid Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="3*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0" Background="LightBlue"/>
<Grid Grid.Row="1" >
<ctrl:Carrousel Grid.Row="0" Background="Green" ItemsSource="{Binding Datas}"
SelectedIndex="0"
TransitionDuration="2500"
Depth="700"
MaxVisibleItems="15"
x:Name="CarrouselElement"
Rotation="50"
TranslateY="0"
TranslateX ="1200">
<ctrl:Carrousel.EasingFunction>
<CubicEase EasingMode="EaseOut" />
</ctrl:Carrousel.EasingFunction>
<ctrl:Carrousel.ItemTemplate>
<DataTemplate>
<Grid Background="Red">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border BorderBrush="#bfbfbf" BorderThickness="1">
<Grid HorizontalAlignment="Stretch">
<Grid.RowDefinitions> …Run Code Online (Sandbox Code Playgroud) 由于不推荐使用webClient而且SharpRest不适用于Windows 8.1,我需要将我的json字符串传递给web api.
string js = @"[{""userName"":""jerin"",""userId"":""a""}]";
var baseAddress ="http://epub3.in/sample/android%20webservice/webservice/insertuser.php/";
HttpClient httpClient = new HttpClient();
HttpClient httpClient = new HttpClient();
httpClient.BaseAddress = new Uri(baseAddress);
httpClient.DefaultRequestHeaders.Accept.Clear();
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
try
{
HttpResponseMessage response = httpClient.PostAsync("",
new StringContent(
js,
Encoding.UTF8,
"application/json")).Result;
string sd = response.IsSuccessStatusCode.ToString();}
Run Code Online (Sandbox Code Playgroud)
现在这里baseaddress是一个包含url地址的字符串.但即使我将IsSuccessStatusCode设为true,也没有输入json.
我应该看到
Android团队在这个链接中输入的结果
是他们的参数值
usersJSON = [{ "的userName": "jerin", "用户id": "3"}]
根据@ Jon的回答,我编辑了我的代码而不是os System.Net.Http我现在正在使用Windows.Web.http,但它仍然没有上传
Run Code Online (Sandbox Code Playgroud)Windows.Web.Http.HttpClient httpClient = new Windows.Web.Http.HttpClient(); Windows.Web.Http.HttpRequestMessage msg = new Windows.Web.Http.HttpRequestMessage(new Windows.Web.Http.HttpMethod("POST"), new Uri(baseAddress)); msg.Content = new HttpStringContent((js)); msg.Content.Headers.ContentType = new HttpMediaTypeHeaderValue("application/json"); Windows.Web.Http.HttpResponseMessage …