Hi,
I am using Apply with LinkedIn plugin in my web application.
Getting profiles immediately if using data-email="email@company.com"
But not getting any data in server with data-url
For my web application using following environment
Java, Spring framework
Following code is added in JSP
in Head tag:
<script type="text/javascript" src="http://platform.linkedin.com/in.js">
api_key: Valid API key
</script>
in Body tag,
<script type="IN/Apply"
data-companyid="1195173"
data-jobtitle="Sr Mobile web tester"
data-joblocation="Horsham, PA"
data-url="http://localhost:8000/iMomentous/rest/jobPostingXml" data-urlFormat="xml">
</script>
I can see the button "Apply with LinkedIn" in browser whenever the JSP executed.
Not getting any data in the server after submitting the application.
The following code is using to handle to the input stream.
@RequestMapping(value = "/rest/jobPostingXml", method = RequestMethod.POST)
public String getLiXML(HttpServletRequest req, HttpServletResponse resp) {
log.info("getLiXML in");
try{
String postBody = IOUtils.toString(req.getInputStream(), "UTF-8");
// to do
}catch (Exception e) {
log.error("error occured while getLiXML: "+e);
}
return "xml";
}
Any mistake in my code to handle the LinkedIn profile XML.
Thanks,
Anil K
- Log in to post comments
I notice that you're pointing data-url to a localhost address. This isn't going to work because your endpoint has to be reachable by LinkedIn servers. If you move it to a publicly accessible location, it will probably work.
Best,
Jon