Here's a workaround to get insert capabilities working via the PHP SDK provided for YAP. As mentioned above a GET request with JSON-P (JSON with callback) will work on the system. To modify the SDK to allow this functionality, you can do the following:
In the Yahoo.inc file on like 789 is the following line:
$params = array('q' => $yql, 'format' => 'json', 'env' => 'http://datatables.org/alltables.env');
Switch this to JSON-P functionality by adding a callback like so:
$params = array('q' => $yql, 'format' => 'json', 'callback' => 'runCallback', 'env' => 'http://datatables.org/alltables.env');
Then define in JavaScript the following function (should be in the same file that you're calling the query method):
<script type="text/javascript">
function runCallback(obj){
console.log('callback called' + obj);
}
That should give you the GET request with callback, making the query method be a JSON-P request. This also means that all YQL queries will now go through that callback.
Hope that helps,
Jonathan LeBlanc
Technology Evangelist
Yahoo! Developer Network
Twitter:
@jcleblanc