Nicolas Lehmann
unread,Jun 12, 2011, 8:25:54 AM6/12/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to yourTwapperKeeper, Wolfgang Reinhardt
Hi it would be great if the API of yourTwapperKeeper would support
JSONP Calls.
All you have to change is in the apiListArchives.php from:
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');
echo json_encode($result);
To
header('Cache-Control: no-cache, must-revalidate');
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
header('Content-type: application/json');
$data = json_encode($result);
if( $_GET['jsonp_callback'] ) {
echo $_GET['jsonp_callback'] . '(' . $data . ');';
} else {
echo $data;
}
and similar in the apiGetTweets.php from:
echo json_encode($response);
To:
$data = json_encode($response);
if( $_GET['jsonp_callback'] ) {
echo $_GET['jsonp_callback'] . '(' . $data . ');';
Cheers
Nicolas Lehmann