[英]How to shorten the url link in facebook share…?
I developing WP 8 application. 我正在开发WP 8应用程序。
In my app Facebook share functionality is present. 在我的应用程序中,存在Facebook共享功能。
Sharing work correctly. 正确共享工作。 but i need to shorten the URL value present in share.
但我需要缩短共享中存在的URL值。
First share show the full url value. 首次共享显示完整的url值。
but in second share it's only show the CHENNAI.BURRP.COM 但在第二次分享中,仅显示CHENNAI.BURRP.COM
I try with following code. 我尝试以下代码。
Try1- [I know it's not correct] Try1- [我知道这是不正确的]
string urlvalue = "http://chennai.burrp.com/listing/tuscana-pizzeria_nungambakkam_chennai_outdoor-caterers-restaurants/1494314960";
Try -2 尝试-2
Use hyper link in xaml code 在XAML代码中使用超级链接
<Hyperlink x:Name="Link" NavigateUri="http://chennai.burrp.com/listing/tuscana-pizzeria_nungambakkam_chennai_outdoor-caterers-restaurants/1494314960" > TAVG </Hyperlink>
C# C#
string urlvalue = Link.NavigateUri.ToString();
Both code not working for me. 两种代码都不适合我。
plz tell how to show url value present in second share[image]. 请告诉我们如何显示第二个share [image]中出现的url值。
My share code 我的分享代码
string result = Command.Text;
string heading = Nametb.Text;
string heading2 = Apptb.Text;
string review = Ratingtb.Text;
**string urlvalue = "http://chennai.burrp.com/listing/tuscana-pizzeria_nungambakkam_chennai_outdoor-caterers-restaurants/1494314960";**
FacebookClient.Instance.PostMessageOnWall(result + Environment.NewLine + heading + Environment.NewLine + heading2 + Environment.NewLine + review + Environment.NewLine + google, new UploadStringCompletedEventHandler(PostMessageOnWallCompleted));
Well if you're able to bind, you could do something like this, and bind the shortened URL to the Run's Text
: 好吧,如果您能够绑定,则可以执行以下操作,并将缩短的URL绑定到Run's
Text
:
<TextBlock>
<Hyperlink NavigateUri="http://www.website.com"
RequestNavigate="Hyperlink_RequestNavigate">
<Run Text="{Binding ShortenedLinkDescription}" />
</Hyperlink>
</TextBlock>
EDIT 编辑
Here, I found this . 在这里,我找到了 。 Just sent the Content property of hyperlink, or bind a value to it, and your hyperlink will show up as whats in Content, rather than the full URI.
只需发送超链接的Content属性,或为其绑定值,您的超链接将显示为Content中的内容,而不是完整的URI。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.