Not getting id back.

22 views
Skip to first unread message

Tom Vile

unread,
Jun 3, 2014, 8:46:06 PM6/3/14
to change-...@googlegroups.com
I am using the following code to get the petition id but it is not working:

<?php

$API_KEY = 'MYKEY';

$parameters = array(
  'api_key' => $API_KEY,
  'petition_url' => $PETITION_URL
);

$query_string = http_build_query($parameters);
$final_request_url = "$REQUEST_URL?$query_string";
$response = file_get_contents($final_request_url);

$json_response = json_decode($response, true);
$petition_id = $json_response['petition_id'];
echo $petition_id;

?>


All I want to ultimately do is just get the signed petition count to display on my site.

Thanks for any help.

Tom Vile

unread,
Jun 3, 2014, 9:07:38 PM6/3/14
to change-...@googlegroups.com
Requested a new API key and it is now working fine.
Reply all
Reply to author
Forward
0 new messages