processing application response from apply with linkedin
I am trying to get the response returned by the Apply with LinkedIn plugin. I am using Zend Framework. I have tried using the sample code from linkedIn
<?php
// access raw HTTP POST data
$post_body = file_get_contents('php://input');
$application = json_decode($post_body);
// confirm success by writing applicant name to the error log
error_log(开发者_JAVA百科$application->person->firstName . " " . $application->person->lastName);
// now parse $application and insert data into a DB
// or perform another action
?>
pasted this in my controller and then my view but no success.
my data-url is the url of the current page... Could anyone show me how this is suppose to be done PHP or javascript (need to get the response into the database).
Thanks.
Try replacing
$post_body = file_get_contents('php://input');
With:
$post_body = $this->getRequest()->getRawBody();
Where $this refers to the current request. I'm not positive if you get this for free..., but I'm hoping you can take this from here. I'm not a ZF expert.
精彩评论