javascript SDK突然停止工作,没有显示任何错误#linkedin
我已经创建了一个应用程序来实现登录与链接功能。以前它工作正常,但突然停止工作 以前,如果用户已经登录到LinkedIn,单击“使用LinkedIn登录”按钮将引导用户进入相应的仪表板,否则登录弹出窗口将打开,用户详细信息将保存在db中,用户将重定向到相应的仪表板,但现在什么也没有发生 注意:-我已使用自定义按钮使用此功能。未在提供的按钮代码中链接 以下是我的代码和应用程序创建步骤:- 按钮代码:-javascript SDK突然停止工作,没有显示任何错误#linkedin,linkedin,linkedin-api,linkedin-jsapi,Linkedin,Linkedin Api,Linkedin Jsapi,我已经创建了一个应用程序来实现登录与链接功能。以前它工作正常,但突然停止工作 以前,如果用户已经登录到LinkedIn,单击“使用LinkedIn登录”按钮将引导用户进入相应的仪表板,否则登录弹出窗口将打开,用户详细信息将保存在db中,用户将重定向到相应的仪表板,但现在什么也没有发生 注意:-我已使用自定义按钮使用此功能。未在提供的按钮代码中链接 以下是我的代码和应用程序创建步骤:- 按钮代码:- <a href="javascript:void(0);" onclick="doLinke
<a href="javascript:void(0);" onclick="doLinkedInLoginForBuyer()" class="btn btn--social-li"><?php echo Labels::getLabel('LBL_Linkedin',$siteLangId);?></a>
Javascript sdk代码:-
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key:*********
authorize:true
</script>
<script>
function doLinkedInLoginForBuyer(){
IN.User.authorize(function(){
onLinkedInAuth();
});
}
function onLinkedInAuth() {
IN.API.Profile("me").fields("email-address","first-name","id").result(function (data) {
processLinkedInUserDetails(data);
}).error(function (data) {
$.systemMessage('There was some problem in authenticating your account with LinkedIn,Please try with different login option','alert alert--danger');
});
}
processLinkedInUserDetails = function(data){
data = data.values[0];
fcom.ajax(fcom.makeUrl('LinkedIn', 'loginLinkedIn'), data, function(t) {
var response = JSON.parse(t);
if(response.status ==0){
$.systemMessage(response.msg,'alert alert--danger');
}
if(response.status ==1){
location.href = response.msg;
}
});
};
</script>
api_密钥:*********
授权:正确
函数doLinkedInLoginForBuyer(){
IN.User.authorize(函数(){
onLinkedInAuth();
});
}
函数onLinkedInAuth(){
在.API.Profile(“me”)字段(“电子邮件地址”、“名字”、“id”)。结果(函数(数据){
processLinkedInUserDetails(数据);
}).错误(函数(数据){
$.systemMessage('在使用LinkedIn验证您的帐户时出现问题,请尝试使用不同的登录选项','alert alert--danger');
});
}
processLinkedInUserDetails=函数(数据){
数据=数据。值[0];
ajax(fcom.makeUrl('LinkedIn','loginLinkedIn'),数据,函数(t){
var response=JSON.parse(t);
如果(response.status==0){
$.systemMessage(response.msg,'alert-alert-danger');
}
如果(response.status==1){
location.href=response.msg;
}
});
};
注意:-现在似乎根本不调用onLinkedInAuth()
以及processLinkedInUserDetails()
函数。以前他们工作得很好
如果需要任何其他详细信息,请告诉我。谢谢1.在与LinkedIn客户支持部门进行了长时间的讨论后,他们只是说他们不支持与API相关的问题。他们要求购买premium帐户以获得任何技术支持 2.我还了解到,他们不再支持
Javascript SDK
请点击此处:
解决方案:-现在我遵循下面的帖子,并使其正常工作:
App name – Name of the application.
Company – Name of your company.
App description – Workflow of the application.
App logo – Logo to display on the OAuth dialog.
Privacy policy URL – URL of the Privacy Policy page.
Business email – Your email address.
Products – Select the products that you’d like to add to your app.