SP2010 - How to set URL for GetRatingOnUrl method?

Aug 19, 2014 at 5:41 PM
I'm trying to get the ratings for a list item in a custom list, using the GetRatingOnUrl method. List is rating enabled. I'm accessing this method via the SPServices jquery library. I'm not sure how to set the URL parameter. Currently I'm setting the url this way:
/subsitename/subsitename/subsitename/subsitename/listname/id_.000
since this is how the item was appearing in the FieldRef. I tried setting the URL without the '_.000' too.
I get this error:

Server was unable to process request. ---> Attempted to perform an unauthorized operation

Can somebody tell me what I'm doing wrong? Thanks.

P.S. I've posted this question also on stackexchange here
Coordinator
Aug 20, 2014 at 2:12 AM
It looks like you are trying to do this for list items. Frankly I don't know if it works for list items, but have you tried it with a document URL?

Also, you're not including the /Lists/ portion of the URL:
/subsitename/subsitename/subsitename/subsitename/Lists/listname/id_.000

M.
Aug 20, 2014 at 7:07 PM
Hey Marc,
Yes I did try it with a document URL. The URL was in this format: /subsitename/subsitename/subsitename/subsitename/documents/mydoc.pdf
I tried it with adding servername too.
I get the same error.

and the URL i posted earlier, it was my mistake. In my code I have 'Lists' included.

Is the error not related to URL? I cannot find any example which actually displays the URL. So I had no way of checking.
Appreciate any help.
Coordinator
Aug 20, 2014 at 7:11 PM
Can you post the code you're trying?

M.
Aug 22, 2014 at 4:39 PM
It looks like it is a permissions error, the MSDN docs linked in the documentation show a SQL Exception is thrown if the user does not have permission to view the social ratings for url. Are there any item level permissions on the item you are trying to reach? What do the permissions for the social features look like in Central Admin?