forked from FladeX/homakov.github.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtwitterdetect.html
23 lines (20 loc) · 1.04 KB
/
twitterdetect.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Take any tweet id (.../username/status/<b>482142996411207680</b>) <input id="tweet" value="482142996411207680">
<input type=submit value="Did I retweet it?" onclick=run('retweet')>
<input type=submit value="Did I favorite it?" onclick=run('favorite')>
<br>
Is it useful to detect current user? Yes, when we have a small group of people having favorites/retweets in common (we need to analyze their entire timeline to get better results). <br>We start with the most popular tweets (world cup, oscar, jokes, etc), if any of them worked now current user is in the target group of people who retweeted/favorited the tweet we checked. Next we keep showing the user tweets that can distinguish him from others. Maths.
<script>
function run(type){
id = document.getElementById('tweet').value
var x=window.open('https://twitter.com/intent/'+type+'?tweet_id='+id);
setTimeout(function(){
try{
href = x.location.href
alert('Yes')
}catch(e){
x.close()
alert('No')
}
}, 6000) //depends on your internet connection
}
</script>