Comments (2)
Hi, I don't know much about Windows or Sina Weibo, but here are my O2 related answers
~ Akos.
On Feb 6, 2013, at 14:04, SSSANTON [email protected] wrote:
After reading the lastest README doucument you just uploaded,I still can't use this library to make an Open Platform Client(Sina weibo, like facebook) through oauth2 authorization which based on desktop(win7) enviorment.Is that this library not support in desktop application?
According to my poor knowledge about network and HTTP methods.I learnt that the o2reply is use for deal with the QNetworkreply queue.And the o2replyserver is use for handle the data from the TCP socket.At last,the o2requestor is for GET or POST with the token to use the API.But what make me painful is how all these stuff works in a project.I really want to know is the procedure of the the library(very hopeful).
They are all very similar to their O1 equivalents which is demonstrated in the example Twitter app in the README.
1.Why it use the TCP instead of the QNetworkReply for processing the Authorization Reply?
Because O2ReplyServer is a complete web server. That's how you write network servers in Qt.
(1)What is the purpose of O2::LINK?
This is the method that initiates logging in. So when the user presses the login button for example, you should call this method
(2)Why the RediretUrl is http://localhost:%1/").arg(replyServer_->serverPort()?Can I change it which I had setted on callbackURL setting of the platform I used?
That's a default URL which works for most OAuth providers. You can have a custom one, if Sina Weibo requires it. See the Skydrive customization for example in o2skydrive.cpp.
(3)It that right once the SIGNAL openBrowser(url) is emited,the newconnection from QTCP will be emitted?It's that means that we open the brwoser(Qurl) just for get response from the TCP port and have a TCP newconnecttion?If is is not?And how to active the SIGNAL newconnection?
There is one point in the authentication sequence when the user has to enter name, password, possibly other credentials, authorise your application to access his account etc.
All these need a web UI which you must provide by opening a browser window with the given URL. But the rest of the interaction will be taken care by the service provider.
(4).All the problems troubles me,because it is impossible to get the "CODE" with for acces the TOKEN. without sloving these problem.And could you please give me some advice for getting the CODE from the firt step of the oauth2.0 protocol.
The O2 library will take care of all these. Once the authentication sequence has completed (when you get the linkingSucceeded signal), CODE and TOKEN will be available in the your O2 object instance, in the "code" and "token" properties.
And you don't even need to deal with code and token yourself, if you are using the O2 library for creating authenticated requests, using O2Requestor and O2Reply.
O2Requestor is like QNetworkAccessManager, but instead of sending plain network requests, it creates and sends authenticated requests.
O2Reply is like QNetworkReply, plus it handles network timeouts and expired tokens.
Anyway,no matter you answer all these problems or no,still thanks for share such wonderful oauth2.0 library based on QT,cause such properties is extremly less.And all these problems may only for one reason------I am a typical noob~~~ orz
—
Reply to this email directly or view it on GitHub.
from o2.
Hi! My friend Akos:
In these days,I still working on it and I tried to modify some part of your code,using the QWebView signal(Urlchanged) to get the CODE and the following step is use the QScriptEngine to get the ACCESS_TOKEN.After finishing the oauth2 authorization,I finally managed to update the status in the sina weibo platform!!!
I can't overcome the problems and keep my patience without your generous help! So I have to thank you again!
Best wishes!! ^ ^
from o2.
Related Issues (20)
- Refresh token is deleted when generating a new access token
- Twitter Search by Keyword HOT 1
- Reply content does not work HOT 2
- Reply content not shown on Android HOT 1
- Facebook Example of O2Facebook doesn't run in qt 5.11 Desktop Release and Debug Builds But does Not Run HOT 1
- Twitter media/upload end point produces an error saying : code 32 Could not authenticate you. HOT 2
- No query params found, waiting for more callbacks HOT 1
- Can I use this library with my non-Qt C++ application ? HOT 1
- Getting "unresolved resolved external symbol" error in the example apps HOT 2
- There is no option to send an authenticated HTTP DELETE command using requestor HOT 1
- O2 Outlook handler HOT 1
- textual error strings for network errors
- MSGraph example not working for Native apps
- https uri for replyserver possible ?
- class O0_EXPORT O2Google : public O2
- hmac-sha256
- o2.cpp : patch from digiKam core about scope and state parameters HOT 2
- Memory leak in o2requestor.cpp
- Switching accounts
- o2Requestor methods returns id instead of QNetworkReply HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from o2.