Log into twitter? - java

Ok, basically what I am trying to do is get a boolean if I have logged in or not. I am using the Twitter4j library and they gave me the following three things to look at.
http://twitter4j.org/en/code-examples.html
https://github.com/yusuke/sign-in-with-twitter/blob/master/src/main/java/twitter4j/examples/signin/SigninServlet.java
https://github.com/yusuke/sign-in-with-twitter/blob/master/src/main/java/twitter4j/examples/signin/CallbackServlet.java
I have no idea how to log in and get if I logged in successfully.
Thanks, and I have no code btw... all I did was basically copy code and try different things.
PS. On a separate note how do I learn how to use someone elses library?

Twitter uses OAuth. There is no concept of having logged in from any external app. There is instead a concept of an app being authorized to communicate with your account on twitter. On how to learn to use somebody else's library... that's a really general question... reading the documentation is a good start, then the IRC channel for the relevant language (or library if it has its own IRC channel).
I've found people on IRC channels to be very helpful when you have a specific code problem you are trying to solve and the real time help often enables faster progress than waiting for answers to a question on a forum or SO.

Related

Email-based sign-up in PlayJava

Now I am researching how to implement email-based sing-up in Play Java. However, I couldn't get any useful information, so can anyone tell me the information? In other words, can anyone show some links or the easy example of it?
This is the example written in Scala, but unfortunately I can't understand well, I am not familiar with Scala...
Any comment is welcome.
EDIT: Some people dislike this question. Maybe they think this is not a good question because I am supposed to reach some answers of this question.
However, in fact there seems to be no information that help me build email-based authentication when using Java. In Play Scala, you have many options. But I want to know how to realize it in Java, not Scala. So, this question is so meaning for some people who try to build a web app in Play Java.
You can do this using the Play Authenticate library: http://joscha.github.io/play-authenticate/

Captcha creation without a third party

Newbie over here. I'm designing and coding a few websites using Adobe Dreamweaver. I'm about 3 months in to web development at my current job at this point. I haven't had any formal training in web development, but I have an eye for design and attention to detail.
However, more technical things are difficult for me as I'm just getting started. I want to create a self contained Captcha within two websites without using a third party service or any downloadable plugins. This is important, because I am creating the website for the company I work for full time as part of my job description.
How would I go about making a simple contact form and captcha using PHP & Java for example? I'm only slightly familiar with PHP and Java.
If someone could just explain this to me in an idiot-proof way I'd really appreciate it. I've been browsing Stack Overflow, but I can't seem to find anything specific and I'd prefer a fresh answer.
Thanks all. I'm also not familiar with most of the jargon yet, so forgive me for my lack of knowledge presently.
If this is an incredibly stupid question also, I apologize - but I still really need an answer.
Using PHP:
start a session
create a random string
store the string into a session variable
create an image to display using php imagecreate
use imagettftext to position the characters one at a time at random angle
Verify user input against the stored session variable

Create a user in IronMQ via API

I'm trying to set up a message queue service for an application I am developing.
I already tried AWS SQS, but it doesn't really fit for our needs, mainly for the issues with the FIFO and the limited message persistence.
So I turned to IronMQ, to see how this could work, but I'm already having issues with the creation of users via java APIs.
There's no class dedicated and it seems nobody cares about that. Does anybody know anything about how to do that? Do I have to write my own APIs?
EDIT: as manveru pointed out, I'm talking about tokens, not users.
Another issue is about setting other permissions than "Admin", but I guess I'll confront it later.
Right now, our API doesn't support creating new access tokens. I think it's something that could be really powerful, though (generate a token per server as part of the build process, for example).
I've created an issue in our global issue tracker. If you like, you can follow that to get a notification when something on this front changes. We have a lot of stuff we're working on right now, so I can't even guess at a timeline, unfortunately. :(
Hope that helps!

Getting WAN Address Java

I have been using the automation feature of whatismyip.com to provide a WAN to my program. However, I recently was banned for overuse (I didn't realizing I was accessing the site every time I started the program to test it). That was my mistake... it wasn't intentional. I've contacted them about it, but in the mean time I need another method.
Are there any other ways to do it and/or does anyone know of another site that provides an automation function?
http://whatismyipaddress.com, but they may well share the same ban list. Both sites have obvious notes embedded in their page source about scripting against their service. I suggest you follow the directions and contact them before you screen scrape them.
I know that http://speedtest.net/ shows your IP, but I am not sure if that is what you need.

Is it a good idea to implement chatroom like functionality via pubsubhub

Actually I want something between chatroom and stackoverflow ie users can ask questions and in my application generally many users will be on the same webpage now others can see the question in realtime and answer the same in realtime ie kind of chatroom type app.
I want to implement it via pubsubhub any suggestions ideas if this is a good idea or not.
Any java system having this functionality will be helpful.
Thanks
Saurabh
I think You can use IRC (Internet Chat Relay ) here for that..
Seems like a perfect match for comet. Pubsubhubbub is better suited for near-realtime server-to-server kinda things.

Categories