I have made an applet that does some processing with a list of source images and displays the results. It works fine for the list of 20 images that I have inside my applet jar, but I would like to get these images from the internet.
Specifically from Facebook. I would like that the user comes to my applet and enters their name and password into my applet and then they will see a thumbnail list of all their facebook freinds.
Now, I know how to display an image in my applet given its URL and I know how to do the processing that I want to do but I dont know how to do the Facebook stuff.
So I suppose the method I would like to implement inside my applet would be something like this:
Do people think this is possible and can anyone point me in the right direction of where to start researching how to do this.
It is not a joke.
Look at this example of an online app that allows the user to use photos from their Facebook account:
http://sendables.jibjab.com/personalize/251/disco?category_id=9 If you click on 'Get Started', you have the option of importing some photos from your Facebook account.
So, this sort of thing can be done, but maybe not in an applet. If not, does anyone have a suggestion as to how it can be done or how it is done in that link?
I would like to use an applet because my application logic is in Java, but maybe my list of URLs can be fed into the applet from some external code that has got them.
Thanks a lot
Joined: Mar 22, 2005
Of course it *can* be done, the question is: is it a practical idea? Would you trust your FB credentials to some applet out there on the web, and then have to rely on that it isn't up to no good? I sure wouldn't.
If the applet should access FB directly, then it would need to be signed (otherwise it wouldn't be allowed to access the site). The alternative would be to have the applet call a proxy on your server that does the interaction with FB, and which then returns the images to the applet over HTTP.
Joined: Apr 01, 2010
Thanks a lot for your reply Ulf.
>> The alternative would be to have the applet call a proxy on your server that does the interaction with FB, and which then returns the images to the applet over HTTP.
This sounds decent to me but I have very little experience with this sort of thing. I dont know what you mean by proxy in this sense. Can you tell what sort of technology you are talking about here and I will investigate it further in tutorials, other forums etc.
Thanks a lot,
Joined: Mar 22, 2005
The proxy would be some server-side code (like a servlet) that acts as FB proxy for the applet. In other words, the applet would access your server, which in turn accesses FB, and then returns whatever data FB sent back to the applet.
This is even scarier as as security scenario, because now not the user's computer accesses FB on their behalf, but some completely invisible piece of code (on your server) over which the user has no control.
Facebook has a developer's program through which you get an API to talk directly to facebook and get all the information you could possibly want. I looked into it once but I forget many of the details. I know that it's a server-side API, and I'm pretty sure they give you black-box libraries to work with (and they're not Java.)
But in any case, if you're serious about this, then you can join the fb developer's program, do all your fb interaction on the server, and then your applet can just be a relatively thin GUI over that.