Summary of the invention
In view of this, it is an object of the invention to propose a kind of desktop note system with microblogging issuing function and microblog release method thereof, there is the function that network accesses and information is mutual, it is possible to issuing microblog information more easily.
Based on the above-mentioned purpose desktop note system with microblogging issuing function provided by the invention, its microblog release method comprises the steps: information that the note tool records user of desktop note system to issue and preserves;The account management module of desktop note system lists the target microblog that optional microblog selects it to release news to ask user;The interactive module login user of desktop note system target microblog account in target microblog;The interactive module of desktop note system sends, to the address of issuing of the microblog system in target microblog, the information that the 3rd http request to be issued to ask upload user;Described 3rd http request is the request from the client at user place to target microblog system server;After the microblog system corresponding to target microblog receives described 3rd http request, the information that described user to issue is sent to microblog system and issues by the interactive module of desktop note system.
Optionally, when first use target microblog account carries out microblogging issue, the step of described login user target microblog account in target microblog performs as follows: described interactive module guides user to input target microblog account and password thereof by its account mandate login interface;Described target microblog account and password are sent to the microblog system of target microblog by described interactive module by its account mandate login interface together with the loopback address of desktop note system;If receiving described microblog system to verify effective information, then perform next step, otherwise return previous step;After a regular length character string is attached to described loopback address by described microblog system and after being sent to described desktop note system, described interactive module sends second http request by its account mandate login interface to the microblog system access token address corresponding to target microblog, and encloses desktop note system at the Identity Code of the microblog system corresponding to target microblog account and key simultaneously;Described interactive module obtains authorization token by its account mandate login interface and logs in target microblog account.
Optionally, after using described target microblog account to log in first, described account management module by its account information memory interface preserve target microblog account and its corresponding authorization token re-use this target microblog account carry out microblogging issue time, connect and operate the step of user's target microblog account in target microblog and perform as follows: described account management module reads interface by its account information and reads the Identity Code of the microblog system corresponding to target microblog account, and described Identity Code is sent to described interactive module;Described interactive module sends the first http request to the microblog system authorized address corresponding to target microblog by its account mandate login interface, and encloses described Identity Code, loopback address and authorization token.
Optionally, described interactive module sends the first http request to the microblog system authorized address corresponding to target microblog by its account mandate login interface, and farther include after enclosing the Identity Code of microblog system corresponding to described target microblog account, loopback address and authorization token: if receiving the effective feedback information of described Identity Code, then described interactive module is connected by its account mandate login interface and is operated target microblog account;If receiving the feedback information that described Identity Code is invalid, then described interactive module logs according to the first step using target microblog account to log in.
Optionally, before performing the step of login user target microblog account in target microblog, described interactive module guides user that its information to issue is edited in detail by its account mandate login interface;And/or after the information that described user to issue is sent to microblog system the step issued, if the information that described user to issue is issued successfully, then described interactive module passes through the feedback information of its information issuing interface reception microblog system corresponding to target microblog;Otherwise return error message.
Further, the present invention provides a kind of desktop note system with microblogging issuing function, including note instrument, for recording information that user to issue and preserving;Account management module, for listing the target microblog that optional microblog selects it to release news to ask user;Interactive module, for user's target microblog account in target microblog;And send, to the microblog system in target microblog, the information that the 3rd http request to be issued to ask upload user;Described 3rd http request is the request from the client at user place to target microblog system server;After the microblog system corresponding to target microblog receives described 3rd http request, the information that described user to issue is sent to microblog system and issues by this interactive module.
Optionally, when first use target microblog account carries out microblogging issue, described interactive module passes through its account mandate login interface login user in the following way target microblog account in target microblog: guide input target microblog account and password thereof;Described target microblog account and password are sent to microblog system together with the redirect_uri of desktop note system;If target microblog account and password are invalid through the microblog system checking of described target microblog, then reboot user and input target microblog account and password;If target microblog account and password are verified effectively through the microblog system of described target microblog, then when after a regular length character string is attached to described loopback address by the microblog system of described target microblog and after being sent to described desktop note system, send second http request to the microblog system access token address corresponding to target microblog, and enclose client_id and client_secret simultaneously;Obtain AccessToken and log in target microblog account.
Optionally, after using described target microblog account to log in first, described account management module preserves target microblog account and its corresponding AccessToken by its account information memory interface;When re-using this target microblog account and carrying out microblogging issue, described interactive module is connected in the following way and is operated user's target microblog account in target microblog by its account mandate login interface: send the first http request to the microblog system authorized address corresponding to target microblog, and encloses the AccessToken corresponding to client_id, redirect_uri of target microblog account and target microblog account.
Optionally, after using described target microblog account to log in first, described account memory module preserves target microblog account and its corresponding AccessToken;When re-using this target microblog account and carrying out microblogging issue, described interactive module is connected in the following way and is operated user's target microblog account in target microblog by its account mandate login interface: send the first http request to the microblog system authorized address corresponding to target microblog, and encloses the AccessToken corresponding to client_id, redirect_uri of target microblog account and target microblog account;If client_id is effectively, log in target microblog account;If client_id is invalid, log according to the first step using target microblog account to log in.
Optionally, after logging in described target microblog account, described interactive module guides user that its information to issue is edited in detail by its account mandate login interface;And/or the information that described user to issue is sent to after microblog system issue by described interactive module by its information issuing interface, if issuing successfully, then the feedback information of reception microblog system corresponding to target microblog, otherwise returns error message.
As can be seen from above, the desktop note system with microblogging issuing function provided by the invention, easily the personal information that user inputs can be shared to network, possess and the function of other system interaction information, user is when being not switched on the network platform corresponding to its network account, just personal information can be shared the webserver, such as each microblogging etc..The desktop note system with microblogging issuing function of the present invention also has interface attractive in appearance while being capable of resource sharing, personal information directly just can be carried out easily issuing and sharing by user in this desktop note system corresponding interface input information with microblogging issuing function, remove the worry every time opening Webpage and login account from, the information of oneself can be shared whenever and wherever possible, use ratio simultaneously and directly use webpage convenient.Additionally, microblog release method provided by the present invention so that the information that user inputs can be transferred directly to microblog system by the instruments such as described desktop note system.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with specific embodiment, and with reference to accompanying drawing, the present invention is described in more detail.
A kind of microblog release method provided by the invention, making desktop note system that this microblog release method can be adopted to be published on destination server by the information that user to share, user can will need the information issued preserved by the desktop note system log (SYSLOG) with microblogging issuing function of the present invention and shared to destination server.Described destination server can be the server of microblog system network-side.
Microblog release method provided by the present invention, based on desktop note system, as a specific embodiment, this desktop note system includes MIM message input module, also includes account management module, interactive module.Described MIM message input module is for recording the information that user to issue.Described account management module is according to different server stores user once used account, and the account information including the account information memory interface externally provided, externally offer reads interface.Described interactive module is mutual for what have between desktop note system and the destination server of microblogging issuing function, including the account mandate login interface externally provided, the information issuing interface that externally provides.
So that the personal information of user is published to network microblog system, namely for described destination server for network microblog system, and in the present embodiment, user to be used for the account of issuing microblog and be called target microblog account, then microblog release method flow process is as it is shown in figure 1, specifically may include steps of:
Step 1: obtain and preserve the information that user to issue.In this step, information that the desktop note system with microblogging issuing function of the present embodiment to be issued by its note tool records user also preserves, and this information can be text message etc..Fig. 4 is the unlatching page schematic diagram of the desktop note system of the embodiment of the present invention.
Step 2: list optional microblog.After preserving the information that user to issue, in the present embodiment, the account information memory interface of the account management module of desktop note system will optionally specify microblog to list, such as Sina's microblogging, Tengxun's microblogging etc., selecting for user, the microblog that user to release news is called target microblog in the present embodiment.
Step 3: log in target microblog account.In the present embodiment, user logs in its target microblog account in target microblog, so that with target microblog account issuing microblog.
Step 4: send upload request.In this step, the information issuing interface of interactive module described in the present embodiment issues address to the BaseURL/2/statuses/upload(microblog system corresponding to target microblog) send the 3rd http request, with the micro-blog information asking upload user to issue.
Step 5: transmit the micro-blog information to issue.In this step, after the microblog system corresponding to target microblog receives described 3rd http request, the information issuing interface of described note system sends the micro-blog information that user to issue to microblog system and issues, if transmitting successfully, then enter step 113, otherwise, step 112 is entered.
Step 6: described information issuing interface backspace error message.
Step 7: receive issue back feedforward information.In the present embodiment, the micro-blog information of user is issued after successfully, and desktop note receives the feedback information of the microblog system corresponding to target microblog, points out issued state.
As an embodiment, adopt the page as shown in Figure 3 as the unlatching page of desktop note system.
When user's first pass desktop note system uses certain target microblog account issuing microblog, step 3 can the process shown in Fig. 2 perform, particularly as follows:
Step 31: guide user to authorize login.Browser component embedded in described mandate login interface guides user to log in authorization page to described microblog system, guides user to input its target microblog account and password logs in.The schematic diagram of described mandate login interface, as it is shown in figure 5, Fig. 5 is only the schematic diagram authorizing login interface of the present embodiment, in concrete practice, authorizes login interface microblog system corresponding to each optional microblog to provide respectively.
Step 32: send account and password to microblog system.Described interactive module authorizes the target microblog account that user input of login interface and password thereof and redirect_uri to be sent to microblog system by it, if account and password are effective, then enters step 33, if it is not, then entrance step 321.
Step 321: described mandate login interface returns error message and returns step 31.
Step 33: send the second http request.After the password that user inputs its target microblog account and target microblog account, the account information of desktop note system reads interface and reads client_id, client_secret, and described client_id, client_secret are sent to described interactive module by account management module.nullIf user is effective in the target microblog account and password authorizing login interface input,Then microblog system generates a Code(regular length character string),And after described Code is attached to described redirect_uri,Return to described interactive module,After described interactive module receives the redirect_uri that addition of described Code,By authorizing the login interface BaseURL/oauth2/access_token(microblog system access token address to the microblog system corresponding to target microblog) initiate second http request,And enclose described client_id simultaneously、Client_secret (microblogging interactive module passes through the third-party application password to the identification identifier of the microblog system application corresponding to target microblog).
Step 34: obtain AccessToken.If client_id, client_secret, Code described in step 33 are effective, then microblog system will produce an AccessToken, after desktop note system obtains this AccessToken, just can connect and operate the target microblog account that user inputs.
When microblogging is sent to some target microblog by the desktop note system that user adopts the present invention for the first time, it is necessary to user inputs microblog account and the code entry microblogging of oneself;This target microblog can produce an AccessToken(authorization token);When user adopts this target microblog account to log in successfully for the first time, the desktop note system of the present embodiment can be passed through its account management module and preserve account and the corresponding AccessToken that user logs in.When user first logs into already with target microblog account, step 3 performs as steps described below:
Send the first http request to microblog system authorized address, namely, the account information of the desktop note system of the present embodiment reads the Identity Code that interface reads the client_id(target microblog account of target microblog account) etc. information, and by the mandate login interface of its interactive module by the client_id of desktop note system, the loopback address of redirect_uri(desktop note system), AccessToken corresponding to target microblog account is sent to the BaseURL/oauth2/authorize (microblog system authorized address) of microblog system corresponding to target microblog together with the first http request (request from client to server), if described identity is effective, successful connection, then can perform step 4;Otherwise identity is invalid, then log in unsuccessful, performs step 31-step 34.
In other embodiments, after step 1, before step 2, can also carry out following step:
Obtain the micro-blog information that user edits in detail, namely, described mandate login interface guides user to detailed edit page, its information inputted in step 1 to be edited in detail, the login interface that authorizes of described interactive module receives the micro-blog information that user edits further in detail, it is possible to allow user to add the additional informations such as picture.Fig. 4 is the desktop note system edit page schematic diagram of the embodiment of the present invention, including adding picture buttons, issuing button, cancel button and Text Entry etc..
In other embodiments, described this step of micro-blog information of editing in detail of user is obtained, it is possible to after step 3, perform before step 4.
In other embodiments, this step of micro-blog information that described acquisition user edits in detail, it is possible to performed before step 4.
In other embodiments, it is possible to after obtaining the micro-blog information that user to issue, be directly entered detailed edit page.
In other embodiments, the page shown in Fig. 4-Fig. 6, it is also possible to be designed to any suitable form.
Further, a kind of desktop note system with microblogging issuing function provided by the present invention, as shown in Figure 6, the desktop note system with microblogging issuing function of the present embodiment, including the MIM message input module 20 with note instrument 21, also include account management module 22, interactive module 23.Described MIM message input module 20 is for writing the information that user to issue;Described note instrument 21 is for recording and preserve the information that user to issue.Described account management module 22 is classified according to different microblog system, the account of storage user once used corresponding different microblog system.Described account management module 22 includes the account information memory interface 221 of externally offer, the account information of externally offer reads interface 222.Mutual between desktop note system and destination server of described interactive module 23, including the account mandate login interface 231 externally provided, the information issuing interface 232 that externally provides.Described account information memory interface 221, after described note instrument 21 records and save the information that user to issue, lists the target microblog that optional microblog selects it to release news to ask user;Described account mandate login interface 231 login user target microblog account in target microblog;Described information issuing interface 232 sends, to the address of issuing of target microblog system, the information that the 3rd http request to be issued to ask upload user, after the microblog system corresponding to target microblog receives described 3rd http request, the information that described user to issue is sent to microblog system and issues.
Optionally, when first use target microblog account carries out microblogging issue, the described mandate login interface login user in the following way target microblog account in target microblog: guide input target microblog account and password thereof;Described target microblog account and password are sent to microblog system together with the redirect_uri of desktop note system;
If target microblog account and password are invalid through the microblog system checking of described target microblog, then reboot user and input target microblog account and password;
If target microblog account and password are verified effectively through the microblog system of described target microblog, then when after a regular length character string is attached to described loopback address by the microblog system of described target microblog and after being sent to described desktop note system, send second http request to the microblog system access token address corresponding to target microblog, and enclose client_id and the client_secret of desktop note system simultaneously;Obtain AccessToken and log in target microblog account.
Optionally, after using described target microblog account to log in first, described account management module preserves target microblog account and its corresponding AccessToken;When re-using this target microblog account and carrying out microblogging issue, the described mandate login interface login user in the following way target microblog account in target microblog:
Send the first http request to the microblog system authorized address corresponding to target microblog to log in target microblog account, and enclose the AccessToken corresponding to client_id, redirect_uri of target microblog account and target microblog account.
Optionally, after using described target microblog account to log in first, described account management module preserves target microblog account and its corresponding AccessToken;When re-using this target microblog account and carrying out microblogging issue, the described mandate login interface login user in the following way target microblog account in target microblog: send the first http request to the microblog system authorized address corresponding to target microblog, and enclose the AccessToken corresponding to client_id, redirect_uri of target microblog account and target microblog account;
If client_id is effectively, log in target microblog account;
If client_id is invalid, log according to the first step using target microblog account to log in.
In other embodiments, after logging in described target microblog account, described mandate login interface guides user that its information to issue is edited in detail.
As can be seen from above, the desktop note system with microblogging issuing function provided by the present invention can to carry out information mutual with microblog system, user logs in microblogging the information shared just can be needed to carry out uploading, sharing without opening webpage, save operating procedure and the time of user, realize userspersonal information's quickly sharing at short notice, it is possible to work for people, life improves efficiency.
The desktop note system with microblogging issuing function provided by the present invention, it is also possible to according to individual subscriber needs, utilizes information that note records and picture carry out microblogging issue or only do the storage of note record by user.After user uses the desktop note system with microblogging issuing function provided by the present invention to log in microblogging success first time, the information such as the microblogging type of user's login, account, password can be encrypted by desktop microblog system, it is stored in data file, when user uses the microblog account carrying out storing to send microblogging, described in can automatically logging into, carry out the microblog account stored.
Those of ordinary skill in the field are it is understood that the foregoing is only specific embodiments of the invention; it is not limited to the present invention; all within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within protection scope of the present invention.