Re: twitter4j + GWT
Can you use RPC's to pass everything twitter4j needs to the server and make your call from there? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/EAQox7IQ6i4J. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: twitter4j + GWT
Thanks, thisis a great lib. But if i want to twitt with the use acount? I will need the oauth procedure, alright? 2011/9/29 Gal Dolber > I don't think twitter4j works on gwt. > I use this http://code.google.com/p/gwt-rest-client/ to call twitter from > gwt > > On Wed, Sep 28, 2011 at 11:50 PM, Bruno Sandivilli < > bruno.sandivi...@gmail.com> wrote: > >> Anyone can help me with this? I want to have an ouath twitter application >> based on on GWT. But i cant add twitter4j on client side, so how can i >> manage the callback url(for example)? Any code snippets are welcome :). >> Thanks! >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Web Toolkit" group. >> To post to this group, send email to google-web-toolkit@googlegroups.com. >> To unsubscribe from this group, send email to >> google-web-toolkit+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/google-web-toolkit?hl=en. >> > > > > -- > Guit: Elegant, beautiful, modular and *production ready* gwt applications. > > http://code.google.com/p/guit/ > > > > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-toolkit@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: twitter4j + GWT
I don't think twitter4j works on gwt. I use this http://code.google.com/p/gwt-rest-client/ to call twitter from gwt On Wed, Sep 28, 2011 at 11:50 PM, Bruno Sandivilli < bruno.sandivi...@gmail.com> wrote: > Anyone can help me with this? I want to have an ouath twitter application > based on on GWT. But i cant add twitter4j on client side, so how can i > manage the callback url(for example)? Any code snippets are welcome :). > Thanks! > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-toolkit@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- Guit: Elegant, beautiful, modular and *production ready* gwt applications. http://code.google.com/p/guit/ -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
twitter4j + GWT
Anyone can help me with this? I want to have an ouath twitter application based on on GWT. But i cant add twitter4j on client side, so how can i manage the callback url(for example)? Any code snippets are welcome :). Thanks! -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
twitter4j + gwt + oauth....
Sure manhere is what I am doing, but please read the notes afterwards, cause I am still learning and I think parts of this process are either not secure and/or won't work in practice. But it did work at 4am last night (and I had only had like 4 beers :) ) I used twitter4j, and followed this blog post: http://jeungun.wordpress.com/2009/09/03/quick-and-dirty-twitter4j-oauth-for-web-apps/ The main difference being that I didn't use 2 servlets. I have one 'twitterservice' servlet that sits on the server, and I do GWT-RPC to talk to that & let it do all the heavy lifting. (also acts as a proxy for the same origin issues). The basic workflow is: - check if I have a access token cookie already - if I have the token cookie, give it to twitter4j, and make calls right away. - if no cookie yet, check for a RequestToken on the server, if none, show 'login with twitter' button - on click of the button, call 'getoauthURL' gwt-rpc on servlet - in getOAuthURL I persist the RequestToken on the server temporarily, and return the oauth URL - back in the clientside, I do a window load to the URL, and let the user authorize the app - once authorized, twitter redirects back to my apps listed URL (see note below) - now back in the client side we still don't have an access cookie, but we DO have a request token - so, this time, call 'getAccessToken' gwt-rpc on the servlet. - save the access token & secret in cookies for the future. Notes: - I persist the request token on the servlet. This is probably due to my lack of web programming background (20+ years of desktop programming, just started with the web now!). Can I do that? Is it safe to just save something in a variable on the server side, or is the servlet instance shared with everyone, thus this process only works in development when I am the only one connecting? This isn't really an issue I suppose, cause I could always store the request token on the client side in a cookie, the same way I do the access token later. - That leads to my second note/question... is it 'safe and secure' to store the access token & secret in a cookie? Is that the expected way of doing it in this case? I do pass the token and secret during the gwt-rpc calls, so I don't know if that defeats the purpose when you expose the secret like that. - Lastly, one gotcha (at least for development) is that twitter won't redirect to localhost, so I just put in my blog url. It redirects there after authorization, but it doesn't matter cause we persist the request token prior to leaving the page, so just go back to localhost by hand, and everything should be happy. -pj On Sun, Sep 13, 2009 at 12:18 PM, Jeff Chimene wrote: > > On 09/13/2009 08:39 AM, PJ Gray wrote: > > Thanks for the help. I messed around with it a bit more, and just kept > > getting frustrated. Uggg, just isn't this hard if I want a > > non-integrated solution in XCodewhy is it here? Anyway, I settled > > on just zipping up my whole folder and putting the zip in source > > control. Big hammer solution, I know...but whatever, I was wasting too > > much time figuring out stuff that should 'just work'. > > > > When I get some free cycles I'll take my questions to an Eclipse related > > forum and maybe make some progress. > > > > thanks again! (just got twitter oauth working in my GWT app last > > night! woohoo!!!) > > By way of thanks, would you please post some code? > > > > > -pj > > > > > > > > On Sat, Sep 12, 2009 at 3:33 PM, Jeff Chimene > <mailto:jchim...@gmail.com>> wrote: > > > > > > On 09/12/2009 10:41 AM, PJ Gray wrote: > > > So maybe I am not fully understanding the versioning situation. > > > > > > I did some research last night, and attempted to get my project > under > > > source control, without any luck. It appears to me that I am > > required > > > to use Subclipse as my subversion client because of some special > way > > > that Eclipse handles projects? > > > > I don't think so. I think Subclipse is popular because it's a good > > Subversion client. However, there may be other Eclipse Subversion > > clients. > > > > > If that is the case, then I suppose > > > I'll take my question to an Eclipse-specific forum. > > > However, it seems like I should be able to use whatever client I > want! > > > > Probably not in the way that I think you mean that statement. Eclipse > > SVN clients are designed to integrate into the Eclipse environment. > It's > > not really a matter of
Twitter4J
Hello. I was wondering if anyone had any experience with twitter4j and the google web toolkit. I'm fairly new to web programming and I'm not entirely sure where to execute the sample code. Specifically, I'm trying to get the OAuth working. There is sample code here: http://yusuke.homeip.net/twitter4j/en/code-examples.html#oauth However, does anyone know if I can put this code into a RemoteServiceServlet as I'm trying to do now? Should I make a separate HttpServlet to try and manage it? Currently, when I run the sample code in my RemoteServiceServlet, I get the following warning when it executes [accessToken = requestToken.getAccessToken();] Jul 30, 2009 12:56:59 PM org.apache.commons.httpclient.HttpMethodBase processResponseHeaders WARNING: Cookie rejected: "$Version=0; _twitter_sess=...; $Path=/; $Domain=.twitter.com". Illegal domain attribute ".twitter.com". Domain of origin: "twitter.com" Can anyone advise me on what to try next or if I'm just doing it completely wrong? Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---