added a readme and a command line tool
This commit is contained in:
1 parent
40130e3c13
commit
3c22873f98
2 files changed
+12
-1
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
# twitter intersection
|
||||||
|
|
||||||
|
|
||||||
|
Command line program written in [Go](https://golang.org) to get the list of the
|
||||||
|
followers of two twitter accounts.
|
||||||
+7
-1
@@ -2,6 +2,8 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
"sync"
|
"sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -79,9 +81,13 @@ func GetFollowerIdsOfBothAccounts(followerGetter FollowerGetter, screenName1, sc
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
if len(os.Args) != 3 {
|
||||||
|
log.Println("you need to specify the name of exactly two twitter account names at parameter")
|
||||||
|
return
|
||||||
|
}
|
||||||
token := "AAAAAAAAAAAAAAAAAAAAAPwfcQAAAAAAzkou%2FHjJNJmwdepeRq0c%2Bi3Nx6o%3DXofLt7SVvc99ulETLRA3yS2lYo8smfc6tACxEYsLUmGsrNbc9J"
|
token := "AAAAAAAAAAAAAAAAAAAAAPwfcQAAAAAAzkou%2FHjJNJmwdepeRq0c%2Bi3Nx6o%3DXofLt7SVvc99ulETLRA3yS2lYo8smfc6tACxEYsLUmGsrNbc9J"
|
||||||
t := NewTwitterApi(TWITTER_API_URL, token)
|
t := NewTwitterApi(TWITTER_API_URL, token)
|
||||||
followers := Intersection(GetFollowerIds(t, "Shopify"), GetFollowerIds(t, "ShopifyPicks"))
|
followers := Intersection(GetFollowerIds(t, os.Args[0]), GetFollowerIds(t, os.Args[1]))
|
||||||
for screenName := range GetScreenNameByIds(t, followers) {
|
for screenName := range GetScreenNameByIds(t, followers) {
|
||||||
fmt.Println(screenName)
|
fmt.Println(screenName)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user