views:

42

answers:

1

We are using YQL to get the Profile Information in a Yahoo! App using YAP, however, we are facing an error while executing the YQL Query. We are using OpenSocial Gadget AJAX Functionality for making the call.

Following is the error message we are getting:

{"error":{"lang":"en-US","description":"Authentication Error. The table social.profile requires a higher security level than is provided, you provided ANY but at least APP is expected"}}

The code we are using is as follows:

var params = {};

params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET;

gadgets.io.makeRequest('http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20social.profile%20where%20guid%3Dme&format=json', userProfileCallback, params);

Kindly have a look and let us know if we are allowed to use the standard gadget method for AJAX Call regarding YQL or we need to follow a different procedure for YQL Integration.

We are of the thought that OAuth is to be integrated with our App somehow to achieve this functionality but we aren't sure about it yet. Can we have some pointers please as how YQL can be used in Yahoo! Apps?

+1  A: 

you're requesting private social data, so you'll need to sign this request using oauth. i think passing the 'signed' param is how you would do this in opensocial, but i don't have first-hand experience, so i can't say for sure.

you'll also need to use the private yql endpoint "http://query.yahooapis.com/v1/yql"

erik
When I tried using the Signed Request, I got a 401.Following are the details:`==== Received response 1:``HTTP/1.1 401``Age: 0``Date: Mon, 21 Jun 2010 10:51:26 GMT``Proxy-Connection: keep-alive``Server: YTS/1.17.22``Transfer-Encoding: chunked``Vary: YahooTransform ====`
Haseeb Khan