Welcome to Dream.In.Code
Getting Help is Easy!

Join 132,295 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,118 people online right now. Registration is fast and FREE... Join Now!




X-Twitter

2 Pages V  1 2 >  
Reply to this topicStart new topic

X-Twitter, Yet another Twitter application (but this one's better)

gabehabe
post 30 Sep, 2008 - 03:32 AM
Post #1


Working Girl.

Group Icon
Joined: 6 Feb, 2008
Posts: 5,402



Thanked 94 times

Dream Kudos: 2625

Expert In: Dingleberries

My Contributions


***UPDATE***
This program's coming along pretty quickly. I've set up a SourceForge at the following address:
https://sourceforge.net/projects/x-twitter/
If you want do download it for testing or just to use, I recommend you get it from there, because it will be the latest version.
Feedback is always welcome.
Enjoy!
***UPDATE***





This is a subject that's interested me for quite a while: Posting data to a site. I've done a bit of this already, so far I've got:

A function to grab the most recent 20 updates from any user
A function to post to your page
A login screen

I'm hoping to add extra features in to this too, stuff that isn't actually featured on Twitter. Stuff like "Top 5 Tweeters."

If you've got any thoughts/suggestions, I'd be glad to take them into consideration.

Oh yeah, it's in C#.NET (surprise, surprise) tongue.gif

I'll post it up as soon as I get a (basic) working version. smile.gif
User is offlineProfile CardPM

Go to the top of the page

gabehabe
post 30 Sep, 2008 - 05:58 AM
Post #2


Working Girl.

Group Icon
Joined: 6 Feb, 2008
Posts: 5,402



Thanked 94 times

Dream Kudos: 2625

Expert In: Dingleberries

My Contributions


I've now added functions to get the most recent update, and get the user's display picture.

I'll be posting most of the news about this project on my Twitter through XTwitter, while I'm working on it. smile.gif
User is offlineProfile CardPM

Go to the top of the page

gabehabe
post 30 Sep, 2008 - 11:51 AM
Post #3


Working Girl.

Group Icon
Joined: 6 Feb, 2008
Posts: 5,402



Thanked 94 times

Dream Kudos: 2625

Expert In: Dingleberries

My Contributions


Just gonna finish removing the HTML from the posts, and I'll upload the first version. I think you'll be pleasantly surprised. smile.gif
User is offlineProfile CardPM

Go to the top of the page

gabehabe
post 30 Sep, 2008 - 12:23 PM
Post #4


Working Girl.

Group Icon
Joined: 6 Feb, 2008
Posts: 5,402



Thanked 94 times

Dream Kudos: 2625

Expert In: Dingleberries

My Contributions


Finally it's ready. Haven't made it parse the HTML in the tweets yet, but that's something to work on. For now, I'd love to get some feedback.

Here's some screenshots:

The main window:
IPB Image

The login form:
IPB Image

After logging in, please be patient~ I haven't put a loady thingy yet, so it looks like it isn't doing anything. In actual fact, it's connecting to your homepage and reading the 20 most recent tweets from you and your friends.

Here's the exe with source:
Attached File  Twitter.zip ( 119.04k ) Number of downloads: 7


I'd love to get feedback on this one, it's my first proper project for connecting to a web page behind the scenes.

smile.gif


Attached thumbnail(s)
Attached Image Attached Image
User is offlineProfile CardPM

Go to the top of the page

born2c0de
post 1 Oct, 2008 - 05:26 AM
Post #5


printf("I'm a %XR",195936478);

Group Icon
Joined: 26 Nov, 2004
Posts: 3,905



Thanked 34 times

Dream Kudos: 2800

Expert In: 80x86 Assembly, C/C++, VB6, VB.NET, C#, J2SE, Win32 API, Reversing

My Contributions


When the '@' character is used to refer to a twitter member, it partially shows the a href HTML tag instead of a link to the member.

When an update is posted, you could refresh the tweets so that our own tweet shows up in the list.

Fix these tiny bugs and you've got yourself a cool, slick app.

P.S : You seriously need to come up with better names for your projects. wink2.gif
User is offlineProfile CardPM

Go to the top of the page

Locke37
post 1 Oct, 2008 - 07:25 AM
Post #6


I'm not a thief...I prefer the term TREASURE HUNTER!

Group Icon
Joined: 20 Mar, 2008
Posts: 911



Thanked 30 times

Dream Kudos: 300
My Contributions


...You need a job, so you don't work so much. laugh.gif biggrin.gif
User is offlineProfile CardPM

Go to the top of the page

gabehabe
post 1 Oct, 2008 - 07:26 AM
Post #7


Working Girl.

Group Icon
Joined: 6 Feb, 2008
Posts: 5,402



Thanked 94 times

Dream Kudos: 2625

Expert In: Dingleberries

My Contributions


laugh.gif I know, I suck at names.

Thanks for the feedback b2c happy.gif

And I've already done those things you said in the latest:
-Automatically updates the FriendPanels every 60 seconds.
-HTML has been removed in the tweets.
-It puts the screen name in brackets next to the real name.
-It says "logged in as" along with the username at the top.

3 downloads?
Out of curiosity, is there anyone here who would actually use it?

Things to add:
-Obviously it needs stabilising, it keeps crashing with this damn thread sleep.gif
-A little popup in the bottom right corner of the screen, like when you get an update on MSN
-Ability to add custom skins (it's only a background image anyway)
.......-Also add the ability to change the appearance of friend panels
-Make it possible to click the links in a tweet
-Ability to close a panel (hide the tweet) by clicking a little 'x'
-Clicking the user's name/image will open their profile
-Add the time/"from" bit to the friend panels, to show when the updates were posted
-Animation is a must for a slick GUI
-Tweet filtering, only seeing tweets from certain users
-Updating your profile (eg, changing the display picture)
-And more that I can't think of right now

whew, that's quite a bit~

And anyone with a better name? wink2.gif
User is offlineProfile CardPM

Go to the top of the page

Locke37
post 1 Oct, 2008 - 07:40 AM
Post #8


I'm not a thief...I prefer the term TREASURE HUNTER!

Group Icon
Joined: 20 Mar, 2008
Posts: 911



Thanked 30 times

Dream Kudos: 300
My Contributions


QUOTE(gabehabe @ 1 Oct, 2008 - 08:26 AM) *

And anyone with a better name? wink2.gif


Z-Twitter. laugh.gif biggrin.gif tongue.gif
User is offlineProfile CardPM

Go to the top of the page

gabehabe
post 1 Oct, 2008 - 11:39 AM
Post #9


Working Girl.

Group Icon
Joined: 6 Feb, 2008
Posts: 5,402



Thanked 94 times

Dream Kudos: 2625

Expert In: Dingleberries

My Contributions


Woohoo! X-Twitter just got approved on SourceForge! biggrin.gif
User is offlineProfile CardPM

Go to the top of the page

baavgai
post 1 Oct, 2008 - 12:01 PM
Post #10


Dreaming Coder

Group Icon
Joined: 16 Oct, 2007
Posts: 1,960



Thanked 95 times

Dream Kudos: 475

Expert In: C, C++, Java, C#, ASP.NET, PHP, Perl, Python, Oracle, SQL Server, MySql, HTML, JavaScript, Lua

My Contributions


QUOTE(gabehabe @ 30 Sep, 2008 - 04:23 PM) *

I'd love to get feedback on this one, it's my first proper project for connecting to a web page behind the scenes.


Well, you asked for it. evil.gif

First,
csharp

} catch (Exception ex) {/* DO NOTHING */}


What could possibly go wrong? tongue.gif You should only ignore exceptions in very rare cases. At the very least, send something to the output window so you can tell something happened:

csharp

} catch (Exception ex) {
System.Diagnostics.Debug.WriteLine(ex.Message);
}


One class per file. Java enforces this in a draconian fashion where C# doesn't, but that doesn't mean you shouldn't follow the model. Avoid struts, that Tweet object could probably be doing more work for you.

This business of the login from the main form and self closing, ick.
csharp

public partial class MainForm : Form {
void MainFormLoad(object sender, EventArgs e) {
Login login = new Login();
login.ShowDialog();
if (login.login == false)
this.Close();
else {


Putting it in the root is all together cleaner.
csharp

private static void Main(string[] args) {
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Login login = new Login();
login.ShowDialog();
if (login.login) {
MainForm frm = new MainForm();
frm.SetLogin(login.username, login.password);
frm.ShowDialog();
}
}


Last, but not least, static is bad. It creates bad programming habits, grows hair on your palms, etc.

Now, a design hint. It looks like their pages are valid XHTML. Rather than playing string games, you might have an easier time with an XmlDocument and xpath.

Overall, well done. I'm rather surprised you've been working in the language for such a short time with no Java experience. Pity I have no interest in Twitter. tongue.gif
User is offlineProfile CardPM

Go to the top of the page

gabehabe
post 1 Oct, 2008 - 12:34 PM
Post #11


Working Girl.

Group Icon
Joined: 6 Feb, 2008
Posts: 5,402



Thanked 94 times

Dream Kudos: 2625

Expert In: Dingleberries

My Contributions


Thanks baavgai icon_up.gif

I'll take those tips into consideration in future~

I never even thought to put it in the root sleep.gif

I'll stick with the string games for now, I might update it in future to work as an XmlDocument.

Until then, here's the latest version:
Attached File  Twitter.zip ( 157.26k ) Number of downloads: 1


New features include automatic updates of the FriendPanels, and an MSN-style update in the bottom right corner of the screen. (I might have to move it up a bit, I forgot)

It's also a lot more stable.

As always, I'd love to get some feedback. smile.gif
User is offlineProfile CardPM

Go to the top of the page

Locke37
post 1 Oct, 2008 - 07:25 PM
Post #12


I'm not a thief...I prefer the term TREASURE HUNTER!

Group Icon
Joined: 20 Mar, 2008
Posts: 911



Thanked 30 times

Dream Kudos: 300
My Contributions


QUOTE(baavgai @ 1 Oct, 2008 - 01:01 PM) *

Overall, well done. I'm rather surprised you've been working in the language for such a short time with no Java experience. Pity I have no interest in Twitter. tongue.gif


Hell, I've got more Java experience than he's got C# experience (in terms of time), but I have a college life to attend to...and a C++ class, so I don't have a lot of time to play around and learn as quick as he does in languages that I like...such as Java. I wouldn't know the first thing about connecting to a web page...He's certainly got more experience in C# than I do in Java (in terms of skill).

By the way...C++ is far too complicated for it's own good...sleep.gif

This post has been edited by Locke37: 1 Oct, 2008 - 07:28 PM
User is offlineProfile CardPM

Go to the top of the page

2 Pages V  1 2 >
Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 01:26AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month