简体   繁体   English

从 Windows Phone 8.1 应用程序打开 LinkedIn 和 Twitter 应用程序的 Uri Scheme 是什么?

[英]What is the Uri Scheme to open LinkedIn and Twitter App from an Windows Phone 8.1 App?

I am developing a Windows Phone 8.1 app.我正在开发 Windows Phone 8.1 应用程序。 I need to open a person's profile in the LinkedIn and Twitter App (which is already installed in the phone) from my own app.我需要从我自己的应用程序中打开 LinkedIn 和 Twitter 应用程序(已安装在手机中)中的个人资料。

To achieve this functionality I know I need the URI Scheme of the above two apps.要实现此功能,我知道我需要上述两个应用程序的URI 方案

I am successful in opening the Facebook app, by using the following code snippet:通过使用以下代码片段,我成功打开了 Facebook 应用程序:

public async void OpenFbProfile(string id)
{
    Launcher.LaunchUriAsync(new Uri("fb:profile_id=" + id)); //worked fine
}

Similarly I was trying the same, to open the LinkedIn and Twitter apps, but was unsuccessful.同样,我也尝试过,打开 LinkedIn 和 Twitter 应用程序,但没有成功。

public async void OpenLinkedInProfile(string id)
{
    Launcher.LaunchUriAsync(new Uri("LinkedIn:profile_id=" + id)); //not working
}

public async void OpenTwitterProfile(string id)
{
    Launcher.LaunchUriAsync(new Uri("Twitter:profile_id=" + id)); //not working
}

So, can anyone tell me the URI Schemes of these two apps?那么,谁能告诉我这两个应用程序的 URI Schemes 吗?

And what will be the URI to open a person's profile with the profile id, in these two apps?在这两个应用程序中,使用个人资料 ID 打开个人个人资料的 URI 是什么?

 await Launcher.LaunchUriAsync(new Uri("Twitter:profile?username=@YOUR_TWITTER_USERNAME"));

While understandably one maybe looking for a quick answer.虽然可以理解,但人们可能正在寻找快速答案。 Its strongly suggested that one studies the standards behind the technology one is working with.它强烈建议人们研究正在使用的技术背后的标准。

https://www.chromium.org/developers/web-intents-in-chrome https://www.chromium.org/developers/web-intents-in-chrome

https://www.w3.org/TR/web-intents/ https://www.w3.org/TR/web-intents/

Both of those shows an abstraction layer method to calling any intent one desires.这两个都显示了一种抽象层方法来调用人们想要的任何意图。

One is even able to register their own intents via http://www.openintents.org/intentsregistry/人们甚至可以通过http://www.openintents.org/intentsregistry/注册自己的意图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM