Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to add Facebook like button in Java Swing Application  RSS feed

 
sumit jagtap
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have one Java Swing application and i want to add Facebook like button on home page can we do that ?

kindly help ....
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FB expects a URL to be "liked". In your case, what do you expect to be "liked", considering it is a swing application?
 
sumit jagtap
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear ,

i have one small desktop application and i need one Facebook liked button, when i click on this button then one small popup window will be activate then users will login using Facebook login & password.

my purpose is only to show my application likes on my home page...

please if you have any solution or question then kindly revert....
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FB likes works via HTTP, and expects to be embedded in a web page. Since you don't have that, you would have to reverse-engineer its protocol, and implement that in your Java code. While not impossible, it's also not trivial by any means, especially as it also involves the login. I'm not aware of anyone who has implemented something like this.
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sumit jagtap wrote:
my purpose is only to show my application likes on my home page...

Does your application have a web page? If yes, you can consider having the like button on that page. From the app, you can send* the user to this game web page, and the liking activity can happen there. I am sure FB has examples on how to integrate the like API to your page.

* If your application uses Java 7 you can use Desktop#browse(URI uri) where the uri points to your application web page.
Else check out http://www.centerkey.com/java/browser/
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!