I have been having some difficulty getting this to work.
We are currently on Office 365.
SPServices on the whole works - we have a production system using some commands.
However, I have been having some trouble with SPGetCurrentUser working.
At first I tried using version 0.7.2 together with jquery 1.8.3 in a different site collection but discovered that it won't work since I need to be able to see the current site plus '_layout/userdisp.aspx'
So I switched to using SPServices 2013.01 but it still didn't work. Here is my code snippet:
We are currently on Office 365.
SPServices on the whole works - we have a production system using some commands.
However, I have been having some trouble with SPGetCurrentUser working.
At first I tried using version 0.7.2 together with jquery 1.8.3 in a different site collection but discovered that it won't work since I need to be able to see the current site plus '_layout/userdisp.aspx'
So I switched to using SPServices 2013.01 but it still didn't work. Here is my code snippet:
//Get the user loginName
var currentuserval = $().SPServices.SPGetCurrentUser({
webURL: 'https://mydomain.sharepoint.com',
fieldName: 'Title',
debug: true
});
alert(currentuserval);
After that didn't work, I tried something simpler:alert($().SPServices.SPGetCurrentSite());
alert($().SPServices.SPGetCurrentUser({webURL:'https://mydomain.sharepoint.com', fieldName:'Title'}));
I still get a blank for the result. I tried to use SPGetCurrentUser on my root site but still have the same blank issue.