Verify that one user is following the other, using the SC (sound cloud) API in Javascript

2

I'm developing a web page where this page will be using the SC SDK API . What happens, is that I am not being able to use the function to check if one user follows the other. In the case, the user would log on the page and a function would check if that user who is logged in, is following the user of the page ...

In this case I did it one way, but it is limited by SC.

$("#connect").live("click", function(){
var follo = 400;
SC.get("/users/"+ idUser +"/followings",{
            limit: follo
        },function (followings) {

        for (var i = 0; i < followings.length; i++){
             var id = followings[i].id;
             if(id == idUser){
               alert('True');
               break;
        };
  };
});

That way it works the way I want it, I pick up the list of all the people the user follows and check if the page owner is on this list, but ... if I do not set a limit, the default limit is 50 user, and if I set a limit, I can expand up to MAXIMO 200 users, even if the limit is 400 as in the example above, but there are users that follow a lot more users. In the link I went through, there is an example that I think would solve my case, but I did not find a right way to use it:

/users/{id}/followings/{id} a user who is followed by the user.
    
asked by anonymous 22.09.2015 / 15:34

0 answers