Merge pull request #1 from imperatrona/open-account
Reusing open account
This commit is contained in:
commit
d45ac95957
5 changed files with 45 additions and 22 deletions
13
README.md
13
README.md
|
|
@ -82,7 +82,16 @@ scraper.IsLoggedIn()
|
|||
If you don't want to use your account, you can try login as a Twitter app:
|
||||
|
||||
```golang
|
||||
err := scraper.LoginOpenAccount()
|
||||
account, err := scraper.LoginOpenAccount()
|
||||
```
|
||||
|
||||
You can manually set a specific user account:
|
||||
|
||||
```golang
|
||||
scraper.WithOpenAccount(twitterscraper.OpenAccount{
|
||||
OAuthToken: "TOKEN",
|
||||
OAuthTokenSecret: "TOKEN_SECRET",
|
||||
})
|
||||
```
|
||||
|
||||
### Get user tweets
|
||||
|
|
@ -98,7 +107,7 @@ import (
|
|||
|
||||
func main() {
|
||||
scraper := twitterscraper.New()
|
||||
err := scraper.LoginOpenAccount()
|
||||
account, err := scraper.LoginOpenAccount()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue