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 :

  1. with sharepointplus (a javascript api) :

    $sp().whoami({url:"http://my.si.te/subdir/"}, function(people) {   console.log(people["accountname"]); }); 
  2. 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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -