Home Forums Wiki Doc Install Extras Screenshots Source Code Projects Blog Users Groups Register
Glx-Dock / Cairo-Dock List of forums Applets | Applets Twitter [and Identi.ca] applet
The latest stable release is the *3.4.0* : How to install it here.
Note: We just switched from BZR to Git on Github! (only to host the code and your future pull requests)
Applets | Applets

Subjects Author Language Messages Last message
Twitter [and Identi.ca] applet [Bug #268]
Page : 1 2 3 4 5 6
Eduardo Mucelli English 118 matttbe [Read]
09 May 2015 à 10:10

Eduardo Mucelli, Wednesday 07 December 2011 à 00:56 | Quote


Subscription date : 05 August 2009
Messages : 285
Hey, while talking with Fab during the Ubuntu Paris, he told me about the necessity of a Twitter applet. I've been working for a while with the oauth 3-legged process, and I finished the first version. So far it has only the possibility to post a tweety, but in the first version it will be possible also to see the timeline. Im not having that much time, and since I chose to code everything, using just standard libraries, it is taking longer. Here are some straighforward print screens. I really need to polish too much the code before push the first version.

http://dl.dropbox.com/u/1433190/Twitter/send.png
http://dl.dropbox.com/u/1433190/Twitter/result.png

matttbe, Wednesday 07 December 2011 à 02:03 | Quote


Subscription date : 24 January 2009
Messages : 12573
Good news

I chose to code everything, using just standard libraries
Good idea too

Take your time
I'm sure Fabounet will be happy to hear that.

fabounet, Wednesday 07 December 2011 à 13:51 | Quote


Subscription date : 30 November 2007
Messages : 17118
yeaaah !
thanks a lot Eduardo !

I chose to code everything, using just standard libraries

+1 too, a possibility is to import some classes in your code (maybe not an entire library, but say, a class that would do the authentication work);
this way, we could avoid the dependencies issue, and the "re-invent-the-wheel" syndrome

Eduardo Mucelli, Wednesday 07 December 2011 à 14:18 | Quote


Subscription date : 05 August 2009
Messages : 285
@fab: sure, Im going to make a separate auth lib for twitter. Do you have plans to re-use it on a "social plugin" or something like that? Even Facebook plugin can be done without dependencies, only Python standard libs.
edit: Only yesterday I saw the blueprint on Launchpad regarding the Twitter applet. You can assign it to me, if it is possible. Is it possible to link in someway the Blueprint with this thread here, so ppl that subscribe there could see what is going on with the development part, I mean, how slow Im coding

matttbe, Wednesday 07 December 2011 à 21:05 | Quote


Subscription date : 24 January 2009
Messages : 12573
Do you have plans to re-use it on a "social plugin" or something like that?
I think it can be interesting to support more social website (e.g. identi.ca, google plus, facebook, etc.). I think most of them use OAuth and as said fabounet on Launchpad, "It should be designed to be very simple".
For me, the most important thing is to be able to send a tweet/message in 1 click (to quickly send a message). Then it can be interesting to show the received messages and the latest tweets of people that we follow but it's maybe better with apps like Gwibber, Pino, etc.

PS: about the blueprint on Launchpad, it's strange but there is a problem to assign any people to a task (it doesn't find any nickname).

fabounet, Thursday 08 December 2011 à 17:11 | Quote


Subscription date : 30 November 2007
Messages : 17118
I +1 Matttbe

Then it can be interesting to show the received messages and the latest tweets of people that we follow but it's maybe better with apps like Gwibber, Pino, etc.

I think we can still provide a short overview of the timeline, nd maybe some info in a dialog (ex.: number of followers) but yes, the goal is not to replace such programs.
it's more like an indicator: notification of new messages, and quick tweet.

Eduardo Mucelli, Sunday 11 December 2011 à 18:01 | Quote


Subscription date : 05 August 2009
Messages : 285
@matttbe, I think you cannot assign me to the Blueprint because Im not in the Cairo-dock Team members, https://launchpad.net/~cairo-dock-team/+members#active. I think if you add me there, I can be assigned to the ticket.

matttbe, Sunday 11 December 2011 à 23:28 | Quote


Subscription date : 24 January 2009
Messages : 12573
No, if I try with fabounet, it doesn't work too...

fabounet, Wednesday 14 December 2011 à 14:50 | Quote


Subscription date : 30 November 2007
Messages : 17118
maybe I have to do it since I'm the one who created the blueprint ?

I've assigned you now, can you check that it works and that you can update the status of the blueprint ?

Eduardo Mucelli, Friday 16 December 2011 à 22:30 | Quote


Subscription date : 05 August 2009
Messages : 285
@fab: the blueprint thing worked!

I pushed the first version, in this version it is possible to post a tweety (left-click on the icon and type the tweety) and see the home timeline (middle click on the icon). Actually it is a version just to make a "backup" of the code and its progress.

Attention: the code is not the way I want yet, so, if someone is going to see the code, please do not modify yet :), give me some time to organize better the source. And that is the same reason that the code still has so many log messages.

matttbe, Saturday 17 December 2011 à 00:57 | Quote


Subscription date : 24 January 2009
Messages : 12573
Thank you for this new applet

This applet seems great but I just want to propose a few modifications (just a few details ):
  • Is it possible to change the category of the applet (e.g. Internet)
  • Is this sentence correct?
    What is your Twitter screen name
    Or maybe username/nickname?
  • About the authentication, I think you can open the weblink with a browser at the same time as the opening of the dialog (or just before)
  • I think it's much better to put the '.users' file in the config directory of Cairo-Dock (e.g. ~/.config/cairo-dock/.Twitter_users) => just have a look to the latest revision (216) about Gmail on this branch. (it's just to prevent to not add the password in a theme or in bzr )

Eduardo Mucelli, Saturday 17 December 2011 à 01:25 | Quote


Subscription date : 05 August 2009
Messages : 285
@matttbe: You are welcome

  • Is it possible to change the category of the applet (e.g. Internet) - Sure
  • Is this sentence correct? - Well, Im not a Twitter user, just created 2 accounts to test the applet At least on the API, they use the term "screen name", but of course it is better "nickname" to make it more understandable.
  • [...] open the weblink with a browser at the same time as the opening of the dialog (or just before) - Doing both opening the browser automatically and showing the dialog makes sense?
  • I think it's much better to put the '.users' file in the config directory of Cairo-Dock - Im going to check that out

matttbe, Saturday 17 December 2011 à 01:32 | Quote


Subscription date : 24 January 2009
Messages : 12573
Doing both opening the browser automatically and showing the dialog makes sense?
Yes I think. But ok, it's maybe better to show a custom widget with the right webpage... But this is what I did: I copy to link on my browser, then I click on the 'Ok' button of the dialog and the same webpage opened it again.

Eduardo Mucelli, Saturday 17 December 2011 à 01:42 | Quote


Subscription date : 05 August 2009
Messages : 285
Yea, actually, or you copy and paste the URL, or you open it pressing Enter. My intention was to not rely only on the webbrowser module, but also have the fallback with the possibility of copy-and-paste. Well, this part is complicated, I know, we can discuss to see what is better.

  • Open the browser only
  • Ask the user to copy and paste (it is possible even to set the URL on the user's clipboard)
  • Let it like it is
  • Open the browser before show the dialog

matttbe, Saturday 17 December 2011 à 01:45 | Quote


Subscription date : 24 January 2009
Messages : 12573
I think it can be interesting to have:
  • Open the browser
  • Show a dialog to say that a Twitter webpage on a browser should be open to accept something and if there is a problem, the link is also available on the same dialog.

Eduardo Mucelli, Saturday 17 December 2011 à 02:00 | Quote


Subscription date : 05 August 2009
Messages : 285
The flow will be broken. If both the page is automatically opened and the dialog is show this happens:

  1. The user will type the user and pass on it on the authorization page.
  2. The page with PIN number will be shown
  3. The user will copy the PIN number
  4. When the user come back to the dock trying to find a place to insert the PIN number, the dialog with the URL will still be there. He will need to click "ok" opening again the browser, or get rid of the dialog in some way.

matttbe, Saturday 17 December 2011 à 02:08 | Quote


Subscription date : 24 January 2009
Messages : 12573
But this is what I did:
  1. There was a dialog with an URL, I copy the link
  2. Open my browser, go to the authorization page
  3. Click on the button and copy the PIN number
  4. Then I press on the dialog and it has re-opened the authorization page.


I think if the webpage is opened before/at the same time of the dialog, it will not be opened twice and we prevent a possible bug with webbrowser module.

Eduardo Mucelli, Saturday 17 December 2011 à 02:19 | Quote


Subscription date : 05 August 2009
Messages : 285
Actually you are right, the flow is broken the same way now

If I understood, you say that the webbrowser is not going to open again the same URL, since it is already opened in the browser? Try on the browser:

import webbrowser
webbrowser.open("http://www.google.com")
webbrowser.open("http://www.google.com")


What I think is that Im going to rely only on the webbrowser module and cross the fingers that it is going to work well

matttbe, Saturday 17 December 2011 à 11:35 | Quote


Subscription date : 24 January 2009
Messages : 12573
you say that the webbrowser is not going to open again the same URL, since it is already opened in the browser? Try on the browser:
No, it's just that if the webpage is already opened, the user will not open it twice

Eduardo Mucelli, Saturday 17 December 2011 à 14:27 | Quote


Subscription date : 05 August 2009
Messages : 285
Im going to base on the webbrowser's exception instead of supose something. If an exception is thrown, I open the dialog with the auth URL, asking the user to copy and paste it. If there is no exception, I will supose that it is ok, and the browser was opened showing only a dialog informing that the browser was opened. As soon as it is a standard lib, I think we can rely on that.

Applets | Applets

Subjects Author Language Messages Last message
Twitter [and Identi.ca] applet [Bug #268]
Page : 1 2 3 4 5 6
Eduardo Mucelli English 118 matttbe [Read]
09 May 2015 à 10:10

Post a message

Anti-spam filter 7 (*) times (*) 4 =
            
Did you know ? You can easily create a link to a wikipedia file by using the tag: [[wikipedia:FILE]]


Glx-Dock / Cairo-Dock List of forums Applets | Applets Twitter [and Identi.ca] applet Top

Online users :

Powered by ElementSpeak © 2007 Adrien Pilleboue, 2009-2013 Matthieu Baerts.
Dock based on CSS Dock Menu (Ndesign) with jQuery. Icons by zgegball
Cairo-Dock is a free software under GNU-GPL3 licence. First stable version created by Fabounet.
Many thanks to TuxFamily for the web Hosting and Mav for the domain name.