some small fixes

This commit is contained in:
Mari Wahl 2014-09-30 23:29:07 -04:00
parent 4f8d5148af
commit 16757b10ac
412 changed files with 139509 additions and 0 deletions

View file

@ -0,0 +1,9 @@
Facebook Tricks
===============
* Delete all your post and likes ("We want privacy").
* Script to say thank you for all bday wishes.
PS: I don't use facebook (ew!) but the last time I tested it worked...

View file

@ -0,0 +1,60 @@
#!/usr/bin/env python
#Dont forget to install the facebook python SDK
import facebook
import json
import os
import random
from time import sleep
FB_ACCESS_TOKEN = # you need to set this
access_token = os.getenv('FB_ACCESS_TOKEN')
# Define message
thankyou_messages = [
'Thank you!',
'Thanks!',
'Thank you! I appreciate it!!!'
]
# "birthday" query
birthday_fql = ("SELECT post_id, actor_id, target_id, created_time, message, comments "
"FROM stream "
"WHERE source_id = me() "
"AND filter_key = 'others' "
"AND created_time > 1391346000 "
"AND actor_id != me() "
"AND comments.count = 0 "
"AND comments.can_post = 1 "
"AND (strpos(message, 'birthday') >= 0 "
"OR strpos(message, 'Birthday') >= 0 "
"OR strpos(message, 'happy') >= 0 "
"OR strpos(message, 'Happy') >= 0) "
"LIMIT 500")
# new GraphAPI instance with our access token
graph = facebook.GraphAPI(access_token)
# birthday posts using our FQL query
query_result = graph.get_object('fql', q=birthday_fql)
# data from the response
birthday_posts = query_result['data']
# how many posts
print'Query returned: ', len(birthday_posts)
# loop through returned posts
for post in birthday_posts:
post_id = post['post_id']
graph.put_object(post_id, 'likes')
rand_message = random.choice(thankyou_messages)
graph.put_object(post_id, 'comments', message=rand_message)
print 'The like/comment should have posted for post', post_id
sleep(0.1) # tenth of a second
print('Done!'')

View file

@ -0,0 +1,11 @@
# run on:
#https://www.facebook.com/your-username/allactivity?privacy_source=activity_log&log_filter=cluster_116
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
setInterval (function () {
var last = $("._6a._6b.uiPopover.rfloat a span").last().click();
$("span:contains(Delete):visible").click();
var post = last.closest("[data-ft]");
post.prev().remove();
post.remove();
}, 400);

View file

@ -0,0 +1,11 @@
# run on:
#https://www.facebook.com/your-username/allactivity?privacy_source=activity_log&log_filter=likes
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
setInterval(function () {
var last = $("._6a._6b.uiPopover.rfloat a span").last().click();
$("span:contains(Unlike):visible").click();
var post = last.closest("[data-ft]");
post.prev().remove();
post.remove();
}, 400);

View file

@ -0,0 +1,9 @@
# run on your account
var i = setInterval(function () {
$ul = $("#wmMasterViewThreadlist")
if (!$ul.find("li").length) return clearInterval(i);
$ul.find("li").last().find("span").click()
$("button:contains('Actions')").click()
$("span:contains('Delete Conversation...')").click()
$("input[value='Delete Conversation']").click()
}, 500);

View file

@ -0,0 +1,12 @@
# run on:
# https://www.facebook.com/your-username/allactivity?privacy_source=activity_log&log_filter=cluster_11
$("html, body").animate({ scrollTop: $(document).height() }, "slow");
setInterval (function () {
var last = $("._6a._6b.uiPopover.rfloat a span").last().click();
$("span:contains(Delete):visible").click();
setTimeout(function () {
$("button:contains(Delete Post):visible").click();
last.closest("table").remove();
}, 1000);
}, 7000);