【问题标题】:When sharing a site or link to individual people on Linkedin, the Link doesn't show in the Linkedin Android app在 Linkedin 上与个人分享网站或链接时,链接不会显示在 Linkedin Android 应用程序中
【发布时间】:2017-09-01 20:48:28
【问题描述】:

我目前正在为网站上的 Linkedin 放置一个分享按钮。一切正常,除非我尝试使用共享网址 (https://www.linkedin.com/shareArticle?mini=true&url=MYURL) 将其分享给个人 (Share to individual people screenshot) 并且他们看起来在它 通过安卓应用。在android上的消息“我认为你可能是 有兴趣”显示在消息框中,但没有指向该站点的链接。我 还尝试对共享链接生成器 (https://developer.linkedin.com/plugins/share) 执行相同的操作,以查看我是否生成了错误的链接,但这会导致相同的问题。我也使用 IOS 应用程序进行了测试,并且链接确实显示和工作。是否有其他人有同样的问题并且知道出了什么问题以及如何解决它?提前致谢。

【问题讨论】:

标签: android linkedin


【解决方案1】:

你可以试试这个

Intent linkedinIntent = new Intent(Intent.ACTION_SEND);
linkedinIntent.putExtra(Intent.EXTRA_TEXT, edinputText.getText().toString().trim());
linkedinIntent.setType("text/plain");

boolean linkedinAppFound = false;
List<ResolveInfo> matches2 = this.getPackageManager()
                        .queryIntentActivities(linkedinIntent, 0);

for (ResolveInfo info : matches2) {
     if (info.activityInfo.packageName.toLowerCase().startsWith(
                            "com.linkedin")) {
     linkedinIntent.setPackage(info.activityInfo.packageName);
     linkedinAppFound = true;
                        break;
                    }
      }
    if (linkedinAppFound) {
           startActivity(linkedinIntent);
      } else {

           Toast.makeText(MainActivity.this, "Please install the LinkedIn app to share your result", Toast.LENGTH_LONG).show();
  }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-10-06
    • 1970-01-01
    • 1970-01-01
    • 2021-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多