当我在 LinkedIn 上分享我的网站 URL 时,它会显示我网站上的图像,但它不是相关图像。我可以更改预览图像吗?
<meta property="og:url" content="http://mywebsite.com/" />
<meta property="og:type" content="website" />
<meta property="og:title" content="yyyy" />
<meta property="og:description" content="yyyy" />
<meta property="og:image" content="http://mywebsite.com/wp-content/themes/newtheme/img/logo.png" />
Run Code Online (Sandbox Code Playgroud)
我已经设置了这些元标记。
我无法通过 linkedin v2 api 获取用户的电子邮件地址。我在应用程序设置和访问令牌请求中添加了 r_emailaddress 权限。但它说。
{
"serviceErrorCode": 100,
"message": "Not enough permissions to access: GET-members /clientAwareMemberHandles",
"status": 403
}
Run Code Online (Sandbox Code Playgroud)
我的请求网址是:
https://api.linkedin.com/v2/clientAwareMemberHandles?q=members&projection=(elements*(primary,type,handle~))&oauth2_access_token=".$token
Run Code Online (Sandbox Code Playgroud)
任何人请帮我解决这个问题。
我读了半天 LinkedIn v2 API,但无法理解共享和活动之间到底有什么区别?
当我通过https://api.linkedin.com/v2/shares获取共享时,我得到具有共享 id / urn (例如 urn:li:share:6432959801428316160)和活动 urn (例如 urn:li:activity: 6432959801868713984)。对于这两个骨灰盒,我可以通过https://api.linkedin.com/v2/socialActions获取相同的点赞/评论计数。
活动瓮被描述为“与此共享相关的活动的瓮”,但我在文档中找不到活动到底是什么,特别是与共享相比。
在过去的几天里,我一直在尝试实现 LinkedIn 上的用户登录,但出现错误,并且在 Google 上搜索没有结果。
当我的登录页面加载时,即使我没有单击 LinkedIn 登录按钮,LinkedIn 的弹出窗口也会自动打开。
当我单击该按钮时,LinkedIn 的登录弹出窗口将打开。但是,在提供凭据后,我收到以下错误:

这是我的 app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { ReactiveFormsModule, FormsModule} from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { MaincomponentComponent } from './maincomponent/maincomponent.component';
import { HomeComponentComponent } from './maincomponent/home-component/home-component.component';
import { SignupComponentComponent } from './maincomponent/signup-component/signup-component.component';
import { EqualValidatorDirective } from './directives/equal-validator.directive';
import { UniqueEmailValidatorDirective } from './directives/unique-email-validator.directive';
import …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 linkedin API 在 linkedin 上分享我的网站帖子。其中一项功能是安排在一段时间或特定日期后发布帖子。我想知道是否有任何可用的 Api,我可以在其中传递一些参数并在 linkedin 上提交帖子。如果有人以前做过此操作,请帮忙
谢谢!!
我需要使用Share API来获取阅读分享或评论,文档说我需要r_member_social权限,我怎样才能获得该权限?
我在 LinkedIn 上分享时遇到困难。我试图通过 LinkedIn API V2 发布 LinkedIn 共享,每次发出发布请求时,我都会从服务器收到请求超时(状态 504)答案。这是我的代码:
myPost = {
'author': 'urn:li:person:' + this.uid,
'lifecycleState': 'PUBLISHED',
'specificContent': {
'com.linkedin.ugc.ShareContent': {
'shareCommentary': {
'text': 'Hello World! This is my first Share on LinkedIn!'
},
'shareMediaCategory': 'NONE'
}
},
'visibility': {
'com.linkedin.ugc.MemberNetworkVisibility': 'PUBLIC'
}
}
header = {
'Content-Type': 'application/json',
'X-Restli-Protocol-Version': '2.0.0',
'Authorization': 'Bearer ' + token
};
this.http.post('https://api.linkedin.com/v2/ugcPosts', myPost, header).then(res => {
alert(JSON.stringify(res));
})
.catch(err => {
alert(JSON.stringify(err));
});
Run Code Online (Sandbox Code Playgroud)
这是错误消息:
{
"message": "Request timed out",
"status": 504
} …Run Code Online (Sandbox Code Playgroud) 最近,我的“使用 Linkedin 登录”功能开始出现问题。我收到以下错误:
Uncaught TypeError: Cannot read property 'then' of undefined at Object.authorize (in.js:18)
我确实在应用程序的 OAuth 2.0 设置中正确定义了重定向 URL。
我的 LinkedIn 应用程序列出了以下权限:
这是我的代码:
<script type="application/javascript">
//This will be re-defined where it is needed
var linkedInAPILoaded = function(){};
</script>
<script type="text/javascript" src="https://platform.linkedin.com/in.js">
api_key: ${apiKey}
authorize: true
onLoad: linkedInAPILoaded
lang: en_US
</script>
<form name="li_signin" class="li_signin" action="<c:url value='/signin/linkedin'/>" method="post">
<input type="hidden" name="${_csrf.parameterName}" value="${_csrf.token}"/>
<a id="linkedInIcon" href="javascript:;" aria-label="<spring:message code="oa.social.linkedin.login"/>">
<i class="glyphicon glyphicon-refresh gly-spin hidden"></i>
<img src="<c:url value='/images/In-2C-48px-R.png'/>" alt="<spring:message …Run Code Online (Sandbox Code Playgroud) javascript linkedin-jsapi spring-social-linkedin linkedin-api
当我在 LinkedIn 上分享时,我在我的网站上创建了一个帖子,但它没有显示完整的分享 URL。
目前,我正在使用https://www.linkedin.com/sharing/share-offsite/?url=www.example.com/share/?id=12654
但是当我使用上面的重定向到下面的 URL 与 LinkedIn 共享时:
www.example.com/share
Run Code Online (Sandbox Code Playgroud)
它删除了使用 id 传递的参数。如何获取完整的 URL:www.example.com/share/?id=12654
我正在尝试以下请求:
GET https://api.linkedin.com/v2/people/(id:urn:li:person:<person id>)?oauth2_access_token=<token>&projection=(results*(localizedFirstName,vanityName))
Run Code Online (Sandbox Code Playgroud)
但我总是得到:
{
"serviceErrorCode": 100,
"message": "Unpermitted fields present in RESOURCE_KEY: Data Processing Exception while processing fields [/memberId]",
"status": 403
}
Run Code Online (Sandbox Code Playgroud)
如果我尝试使用替代 API 来执行此操作:
GET https://api.linkedin.com/v2/people?ids=List((id:urn:li:person:<person id>))&oauth2_access_token=<token>&projection=(results*(localizedFirstName,vanityName))
Run Code Online (Sandbox Code Playgroud)
返回内部服务器错误:
{
"message": "Internal Server Error",
"status": 500
}
Run Code Online (Sandbox Code Playgroud)
我正在使用 Google Chrome 来执行这些请求。
我也尝试过使用邮递员。
标题:
X-Restli-Protocol-Version: 2.0.0
Authorization: Bearer <token>
Run Code Online (Sandbox Code Playgroud)
得到:
{
"serviceErrorCode": 0,
"message": "Syntax exception in path variables",
"status": 400
}
Run Code Online (Sandbox Code Playgroud)
我的应用程序权限是:
我尝试了其他 API(socialActivity、ugcPosts),一切看起来都很好。
我检查了我的 API 使用情况,https://www.linkedin.com/developers/apps/<id>/usage …