Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example.go is broken #4

Closed
gladimdim opened this issue Dec 18, 2010 · 4 comments
Closed

example.go is broken #4

gladimdim opened this issue Dec 18, 2010 · 4 comments

Comments

@gladimdim
Copy link

I'm trying to use your package and compile example.go file.

However I got such compile errors for such Go version:
8g -V: 8g version 7002

Compile errors:
8g example.go
example.go:100: cannot use AT (type *oauth.AccessToken) as type oauth.Params in function argument
example.go:100: not enough arguments to function call
example.go:131: cannot use AT (type *oauth.AccessToken) as type oauth.Params in function argument
example.go:131: not enough arguments to function call

@gladimdim
Copy link
Author

This was fixed by adding "nil" as seconds parameter for lines 100 and 131.

But another issue was found: after clicking "Sign In" page redirects to twitter's get access token page but with empty oauth_token:

https://api.twitter.com/oauth/authorize?oauth_token=

If CallBackUrl is not set for goauthcon, then oauth_token is generated but as I understand there is no functionality in your lib to proceed with twitter's VIN number.

@hokapoka
Copy link
Owner

Hi there

Sorry I modified the Get after making some changes to make the Consumer work with Google's Oauth tokens that were getting mangled, and didn't update the example although I did point it out in the readme file.

I've also not tested it with the twitter since making the changes to work with Google, it could be that the fixes I made to work with Google's Tokens have effected the twitter example.

I'll try to test it out and make any nessasary fixes.

As for entering the VIN number from twitter, no I've not made any provision for not using a callback, although would be very simple to add.

I'll add another example package that works with Google Buzz right now.

Thanks.

@hokapoka
Copy link
Owner

I've added a 2nd example, example_buzz that is a working example, if you change the respective consumer details.

I'll have another look at the Twitter example now.

@hokapoka
Copy link
Owner

I have just tested the original example after modifying the example.go to pass the new params and everything worked flawlessly.

My tests show that if you haven't changed the ConsumerKey & ConsumerSecrect, as well as the CallBackURL with relavant value you will be redirected to the URL that you cited above, where there's no token passed.

Maybe this should be caught by the Consumer, but either way you need the correct details poipulated before it will work for you.

I'll will look into what is necessary to change the Authorization methods so that it can be used in a console or other rather than using a http service to redirect the user. It appears that it's a relatively minor change.

araddon pushed a commit to araddon/goauth that referenced this issue Mar 14, 2013
Few small changes necessary to get Twitter Streaming API working with this library
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants