Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » API link to follow someone?
- EncloCreations
-
500+ posts
API link to follow someone?
does anyone know a link that follows someone just by typing that link?
i tried: https://scratch.mit.edu/site-api/followers/user/ (Insert any username here)/add
i tried: https://scratch.mit.edu/site-api/followers/user/ (Insert any username here)/add
Last edited by EncloCreations (Dec. 24, 2015 15:58:01)
- Zro716
-
1000+ posts
API link to follow someone?
https://scratch.mit.edu/site-api/followers/user/username-to-follow/add/
You had the right link, you're just missing the / at the end.
You had the right link, you're just missing the / at the end.
- EncloCreations
-
500+ posts
API link to follow someone?
https://scratch.mit.edu/site-api/followers/user/username-to-follow/add/ahh thx mate (Sorry for the newbie question)
You had the right link, you're just missing the / at the end.
- EncloCreations
-
500+ posts
API link to follow someone?
https://scratch.mit.edu/site-api/followers/user/username-to-follow/add/hmm its not working
You had the right link, you're just missing the / at the end.

- ev3coolexit987654
-
1000+ posts
API link to follow someone?
It has to be a POST request not a GET request
- EncloCreations
-
500+ posts
API link to follow someone?
how exactly do i do that? It has to be a POST request not a GET request
- EncloCreations
-
500+ posts
API link to follow someone?
Is it this possibly?
$.ajax({
type: “POST”,
url: "https://scratch.mit.edu/site-api/comments/user/“ + anyuser + ”/add/",
});
$.ajax({
type: “POST”,
url: "https://scratch.mit.edu/site-api/comments/user/“ + anyuser + ”/add/",
});
Last edited by EncloCreations (Dec. 24, 2015 16:20:19)
- Dylan5797
-
1000+ posts
API link to follow someone?
Nononono it's PUT not POST Is it this possibly?
$.ajax({
type: “POST”,
url: "https://scratch.mit.edu/site-api/comments/user/“ + anyuser + ”/add/",
});
- EncloTester
-
15 posts
API link to follow someone?
Nononono it's PUT not POST Is it this possibly?
$.ajax({
type: “POST”,
url: "https://scratch.mit.edu/site-api/comments/user/“ + anyuser + ”/add/",
});
This is what i came up with, im basically editing Icelys script so that it follows instead of commenting, but i keep getting a bunch of errors
var username = Scratch.INIT_DATA.LOGGED_IN_USER.model.username;
user = prompt(“Insert your username”);
if (username== user ){
username = prompt(“Please enter your username.”);
}
var numofpages = prompt(“How many pages of followers does this user have?”);
var myFollowers = ;
var page = 1;
function start( e ) {
$.get( "https://scratch.mit.edu/users/“ + username + ”/followers/?page=1", loaded );
}
function loaded( data ) {
var $dom = $( data );
var $users = $dom.find('span.title').children();
for (var i=0; i<$users.length; i++) {
var user = $users.text.trim();
myFollowers.push(user);
}
console.log(“Done page” + page);
page++;
if(page < numofpages){
$.get( "https://scratch.mit.edu/users/“ + username + ”/followers/?page=“+page, loaded );
}
else{
postmethod();
}
};
function postmethod(){
var start = confirm(”Start?“);
console.log(myFollowers);
if(start == true){
for (var i = 0; i<myFollowers.length; i++){
console.log(”Running…");
var current = myFollowers;
$.ajax({
type: “PUT”,
url: "https://scratch.mit.edu/site-api/user/followers/“ + current + ”/add/“,
});
console.log(”Sent to user “ + current);
}
console.log(”Done.“);
}
else {
console.log(”Canceled.“);
}
};
console.log(”Stating…");
start();
Last edited by EncloTester (Dec. 24, 2015 17:15:21)
- EncloTester
-
15 posts
API link to follow someone?
Here is what the console reads
Stating…
VM167:1 Done page1
VM167:1 Array
VM167:1 Running…
VM167:1 Sent to user Ep1cFollower
VM167:1 Running…
VM167:1 Sent to user mineguy1004
VM167:1 Running…
VM167:1 Sent to user Episode2
VM167:1 Running…
VM167:1 Sent to user Robo-Cube
VM167:1 Running…
VM167:1 Sent to user Coder11000
VM167:1 Running…
VM167:1 Sent to user awserglsah
VM167:1 Running…
VM167:1 Sent to user daddyhulk
VM167:1 Running…
VM167:1 Sent to user meowmoo
VM167:1 Running…
VM167:1 Sent to user EncloCreations
VM167:1 Done.
https://scratch.mit.edu/site-api/followers/user/mineguy1004/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/mineguy1004/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/Ep1cFollower/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/Ep1cFollower/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/Episode2/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/Episode2/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/Robo-Cube/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/Robo-Cube/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/Coder11000/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/Coder11000/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/awserglsah/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/awserglsah/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/meowmoo/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/meowmoo/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/EncloCreations/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/EncloCreations/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/daddyhulk/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/daddyhulk/add/ Status: 404
Navigated to https://scratch.mit.edu/users/EncloTester/
Navigated to https://scratch.mit.edu/search/google_results/?q=xerio&date=anytime&sort_by=datetime_shared
Stating…
VM167:1 Done page1
VM167:1 Array
VM167:1 Running…
VM167:1 Sent to user Ep1cFollower
VM167:1 Running…
VM167:1 Sent to user mineguy1004
VM167:1 Running…
VM167:1 Sent to user Episode2
VM167:1 Running…
VM167:1 Sent to user Robo-Cube
VM167:1 Running…
VM167:1 Sent to user Coder11000
VM167:1 Running…
VM167:1 Sent to user awserglsah
VM167:1 Running…
VM167:1 Sent to user daddyhulk
VM167:1 Running…
VM167:1 Sent to user meowmoo
VM167:1 Running…
VM167:1 Sent to user EncloCreations
VM167:1 Done.
https://scratch.mit.edu/site-api/followers/user/mineguy1004/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/mineguy1004/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/Ep1cFollower/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/Ep1cFollower/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/Episode2/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/Episode2/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/Robo-Cube/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/Robo-Cube/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/Coder11000/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/Coder11000/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/awserglsah/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/awserglsah/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/meowmoo/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/meowmoo/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/EncloCreations/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/EncloCreations/add/ Status: 404
https://scratch.mit.edu/site-api/followers/user/daddyhulk/add/ Failed to load resource: the server responded with a status of 404 (NOT FOUND)
base.js:8 Uncaught Uncaught ajax error. Attempted URL: https://scratch.mit.edu/site-api/followers/user/daddyhulk/add/ Status: 404
Navigated to https://scratch.mit.edu/users/EncloTester/
Navigated to https://scratch.mit.edu/search/google_results/?q=xerio&date=anytime&sort_by=datetime_shared
Last edited by EncloTester (Dec. 24, 2015 17:16:18)
- EncloTester
-
15 posts
API link to follow someone?
I get the same error with “PUT” or “POST”
- Dylan5797
-
1000+ posts
API link to follow someone?
On mobile. Help in morning I get the same error with “PUT” or “POST”
Happy holidays
- kccuber
-
1000+ posts
API link to follow someone?
BUMP!!!!!!!!!!!!!!
https://scratch.mit.edu/site-api/users/followers/ToBeFollowed/add/?usernames=FollowerPlease don't necropost.
- Discussion Forums
- » Advanced Topics
-
» API link to follow someone?