我偶然发现guide,它解释了如何使用自动填充LinkedIn功能填写表单字段。我有3个表单字段:
我想填写这些表单字段,点击按钮,从他们的LinkedIn个人资料中获取这些字段。
当您查看指南时,您可以看到我做了三件事:
<div id="linkedin_form">
<form method="post" action="' . $this_page .'">
<p>
<label for="FNAME" id="FNAME">First Name:</label>
<input type="text" name="FNAME" id="FNAME" required="required" />
</p>
<p>
<label for="LNAME" id="LNAME">Last Name:</label>
<input type="text" name="LNAME" id="LNAME" required="required" />
</p>
<p>
<label for="EMAIL" id="EMAIL">Email address: </label>
<input type="text" name="EMAIL" id="EMAIL" required="required" />
</p>
<p>
<label for="CURRENTJOBTITLE" id="CURRENTJOBTITLE">Current Job Title:</label>
<input type="text" name="CURRENTJOBTITLE" id="CURRENTJOBTITLE" />
</p>
<!-- Hidden value for page -->
<input type="hidden" value="1" name="page" />
<input type="submit" value="Next" />
</form>
</div>
<script src="//platform.linkedin.com/in.js" type="text/javascript">
api_key: my_secret_api_key
noAuth: true
lang: en_US
</script>
<script type="IN/Form" data-form="#linkedin_form" data-field-firstname="FNAME" data-field-lastname="LNAME" data-field-phone="C_BusinessPhone" data-field-email="EMAIL" data-field-company="C_company" data-field-title="C_Title" data-field-city="ENTER_CITY" data-field-state="ENTER_STATE" data-field-country="ENTER_COUNTRY" data-field-zip="ENTER_ZIP"></script>
问题是我没有看到HTML按钮。我在我的HTML中获得了一个iframe,但是在我的iframe中,我得到了带有文本的h2(带有其他元素):
Your Request Could not be Completed.
我确保在我的LinkedIn应用程序中,我已将http://mydomain.dev:8888(我的本地工作目录)添加到 OAuth 2.0重定向网址和 Javascript API域 。
我正在使用wordpress并使用短代码创建自定义表单。所以我的表格的完整代码是:
add_shortcode('custom_form','custom_form');
function custom_form()
{
$html = "";
// output form
$html .=
'<div id="linkedin_form"> <form method="post" action="' . $this_page .'">
<p>
<label for="FNAME" id="FNAME">First Name:</label>
<input type="text" name="FNAME" id="FNAME" required="required" />
</p>
<p>
<label for="LNAME" id="LNAME">Last Name:</label>
<input type="text" name="LNAME" id="LNAME" required="required" />
</p>
<p>
<label for="EMAIL" id="EMAIL">Email address: </label>
<input type="text" name="EMAIL" id="EMAIL" required="required" />
</p>
<p>
<label for="CURRENTJOBTITLE" id="CURRENTJOBTITLE">Current Job Title:</label>
<input type="text" name="CURRENTJOBTITLE" id="CURRENTJOBTITLE" />
</p>
<!-- Hidden value for page -->
<input type="hidden" value="1" name="page" />
<input type="submit" value="Next" />
</form></div>';
$html .=
'<script src="//platform.linkedin.com/in.js" type="text/javascript">
api_key: my_secret_key
noAuth: true
lang: en_US
</script>';
$html .=
'<script type="IN/Form" data-form="#linkedin_form" data-field-firstname="FNAME" data-field-lastname="LNAME" data-field-phone="C_BusinessPhone" data-field-email="EMAIL" data-field-company="C_company" data-field-title="C_Title" data-field-city="ENTER_CITY" data-field-state="ENTER_STATE" data-field-country="ENTER_COUNTRY" data-field-zip="ENTER_ZIP"></script>';
return $html;
}
我做错了什么?
答案 0 :(得分:2)
我正在做一些研究来实现LinkedIn自动填充功能。所以,我正在经历LinkedIn AutoFill Setup Guide
我注意到了这一点,“注意:LinkedIn自动填充功能仅适用于使用LinkedIn Lead Accelerator的客户。”
答案 1 :(得分:0)
设置指南 http://help.lms.linkedin.com/hc/en-us/articles/204141578-LinkedIn-AutoFill-Setup-Guide 说您必须将您的域名添加到LinkedIn中的仪表板,但也请联系Linkedin以启用此功能。