mikeknapp / appengine-oauth-library Goto Github PK
View Code? Open in Web Editor NEWAn OAuth library for interacting with Twitter, MySpace, LinkedIn and Yahoo on AppEngine
An OAuth library for interacting with Twitter, MySpace, LinkedIn and Yahoo on AppEngine
I believe that this line:
key = "%s&%s" % (self.consumer_secret, secret) # Note compulsory "&".
should read:
key = urlencode({self.consumer_secret : secret}).replace("=", "&")
I'm basing this on this part of the specification:
http://oauth.net/core/1.0/#anchor16
However, I don't know how this would affect existing interoperability with Twitter, MySpace, etc. But I do know it fixes interoperability issues with a server-side java library, http://spring-security-oauth.codehaus.org/, which does encode these values when constructing the key.
Perhaps it should be an option.
Getting {"errors":[{"message":"Invalid or expired token","code":89}]}
on every endpoint I've tried with fresh access tokens. Here's the auth view:
class GetTwitterTokenView(webapp.RequestHandler):
def get(self):
client = TwitterClient(
TWITTER_CONSUMER_KEY,
TWITTER_CONSUMER_SECRET,
self.request.url
)
auth_token = self.request.get('oauth_token')
auth_verifier = self.request.get('oauth_verifier')
if auth_token and auth_verifier:
tokens = AuthToken\
.gql('ORDER BY created DESC LIMIT 1')[0]
result = client.make_request(
url='https://api.twitter.com/1.1/statuses/user_timeline.json',
token=tokens.token,
secret=tokens.secret
)
return self.response.out.write(result.content)
self.redirect(client.get_authorization_url())
The fix is just to replace all of the http Twitter endpoints in oauth.py with https.
Hi there,
I came across this game "Logo Quiz" on Andoid playstore and i love some cool features which I intend to reuse for an App project I am currently working on.
Please can anyone help me get contacts or link to its developer at "Bubble"?
The actual logo quiz game I am referring to has the following link on Google Play store
https://play.google.com/store/apps/details?id=logos.quiz.companies.game
If a twitter status update contains a tilde character then the status update will fail with an "incorrect signature" error.
This issue can be resolved by modifying the encode function as follows. Note that the encode function is nested in OAuthClient's prepare_request function (located in oauth.py).
Change
def encode(text):
return urlquote(str(text), "")
to
def encode(text):
return urlquote(str(text), "~")
Hi,
I think, there is an issue with the consumer request parameters and particularly the Authorization header. http://oauth.net/core/1.0/#consumer_req_param
Authorization Header : Parameters are separated by a comma character.
Example : Authorization: OAuth realm="http://sp.example.com/",oauth_consumer_key="0685bd9184jfhq22",oauth_token="ad180jjd733klru7",.......
If sent with an HTTP POST the content-type should be application/x-www-form-urlencoded
Regards
Sylvain
Hi,
This is a great library and I've got it working perfectly for use with Twitter. I've created a Google Latitude client with it, however one requirement when updating a users location is so have a Content-Type of application/json when POSTing.
As an initial stab I tried to add to the headers in make_async_request however that seems to throw off the authorisation and I get back a 401 response. Any idea on how to get this library to support setting this?
Thanks,
Alistair
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.