sharepoint - Using SPServices to get user's "My Links" via jQuery -
i trying current user's list of "my links" using spservices & jquery
i new spservices , found this page how values user's profile , supported operation getuserlinks
, however, not sure how format request.
here lame attempt:
var username = $().spservices.spgetcurrentuser({ fieldname: "name", debug: false }); var userlinks = $().spservices.userprofileservice.getuserlinks(username)
i appreciate constructing this!
the correct syntax :
$().spservices({ operation: "getuserlinks", accountname:"username", completefunc: function (xdata, status) { console.log(xdata) } });
your syntax spgetcurrentuser correct doesn't on sharepoint... see, @ least, 2 other options find current user :
with sharepointplus (a javascript api) :
$sp().whoami({url:"http://my.si.te/subdir/"}, function(people) { console.log(people["accountname"]); });
or can change masterpage have details regarding current user code. have @ english blog post or french blog post. it's easy username html directly.
Comments
Post a Comment