Ok, So first I wanted to thank you Chad for your help and your patience.
I did what you told me, that is a great way to debug. I decided to also cut the fat and get to the root of the problems, so I took out most of the unnessasary code. firbug is telling me that dataObj errorcode=badrequest.
yet, the code is pretty much copy pasted from the documentation. The following is the js.
here is my js:
<div id="AppBody" scrolling="no" style="width: 960px; min-height:1000px; overflow:auto; float:left;"> </div>
<script type="text/javascript">
server_url="http://99.238.66.75/thuglife/myspace/www/response2.php";
function makeGetRequest(url) {
var params = new Object();
var d = new Date();
params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;
url = url + '?d=' + d.getTime();
var k = gadgets.io.makeRequest(url, response, params);
}
function makePostRequest(url, postData) {
var params = new Object();
var d = new Date();
postData = gadgets.io.encodeValues(postData);
params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
params[gadgets.io.RequestParameters.POST_DATA] = postData;
url = url + '?d=' + d.getTime();
var k = gadgets.io.makeRequest(url, response, params);
}
function response(dataObj) {
var newData = dataObj.text + "</br>";
newData = newData + dataObj.errors + "</br>";
newData = newData + dataObj.data + "</br>";
newData = newData + dataObj.oauthApprovalUrl + "</br>";
newData = newData + dataObj.oauthError + "</br>";
newData = newData + dataObj.oauthErrorText + "</br>";
document.getElementById("AppBody").innerHTML = newData;
}
var data = {
data1 : "test",
data2 : 123456
};
window.onload(makeGetRequest(server_url));
</script>
here is my server side script:
<?php
// Includes
error_reporting (E_ALL);
require_once("/var/www/thuglife/myspace/client/Config.php");
require_once("/var/www/thuglife/myspace/client/MySpaceAPI.php");
require_once("/var/www/thuglife/myspace/client/Common.php");
require_once("/var/www/thuglife/myspace/client/MyOpenSpaceAPI.php");
// <-- SET YOUR KEY/SECRET HERE
error_reporting (E_ALL || E_STRICT);
// Set the key - application uri - secret key
$myspace = new MySpaceAPI(Config::$APPLICATION_KEY, Config::$APPLICATION_SECRET);
// Get XML, JSON
//$myspace->set_output_array(false); //set to false to get the XML or JSON format instead of native php arrays
//$myspace->set_response_type(ResponseType::$JSON); //change the type to XML, JSON
//--------------------------------------------------------------------
print_r ($_GET);
print_r($_POST);
?>
here is my printout output:
undefined
undefined
undefined
undefined
undefined
undefined
Thank you very much for your help in advance.