JSF and Facebook - java

Is it possible to integrate facebook on a jsf page? Facebook only shows examples with php, but I already have an application written in jsf. I would like the single sign-on feature and be able to get my users pictures from facebook.
Maybe you have a little example on how you would do it :)
Thank you

Yes, it is possible. It does not matter whether it's JSF or any other view technology. You can take a look at RestFB - a Java API for using the Facebook Graph API. Or you can use the brand-new Spring Social, but it is not quite feature-rich yet.

Related

Facebook Signin in a mobile App (backed by a REST API)

I have done some researching but I haven't find a clean explanation of how it all work.
I would like to know how does applicationa like Instagram, Wordcrack (online game), AirBnb and many other app have tier "Login with Facebook" done?
I currently work on the Java REST services that backups up an iOS app.
If some one already has done a similar things in their app/server I would really appreciate some help
I'm not looking for ready to use code answer but more of a general idea of the architecture to achieve this.
thank you!
I've done it in JavaScript, but the principle will surely be the same.
You have an API, provided by facebook. There are some information there :
https://developers.facebook.com/docs/apis-and-sdks#third-party-sdks
And, more than that, you have declare your own app on facebook. This has, for me, 2 goals :
provide the url of your server, so when you'll call facebook with the
login information, he will know where to redirect
specify the access your app need.
When i've begun to watch this, i've discovered satellizer. I think that's a good entry point to understand how it works with an example :
https://github.com/sahat/satellizer
Hope this help.
Supporting login through their website (Facebook,Twitter,Instagram etc) allows a user to use his already active profile to signup to a portal or an app. This way a user experience is enhanced and having to have separate login credentials for different apps and sites are reduced.
A developer utilizes the APIs or SDKs that these social networks expose to let you integrate it in your app and provide an easy sign up process to your users.

Need to display data queried from GAE datastore in a nice way

I want to display data queried from GAE datastore in a nice way (graphs, etc.)
What is the best way to do it?
As I'm already working with GAE, perhaps there is a google API for that? The only thing I found online is Chart.js but I need to channel the JS into java which seems complicated.
Any advise will be welcome, Thanks!
I think a better way is to do the charts from the browser not the server. Just pass your data to the js and use google charts to display them. There are tons of examples and a playground for google charts.
GWT is a natural web front end for GAE applications---the Eclipse Google plugin integrates GWT with GAE, and the GWT tutorial includes a section on GAE. Several charting libraries are available, for example, http://code.google.com/p/gwt-google-apis/wiki/VisualizationGettingStarted. Moreover you can build your own in HTML5 with the GWT Canvas.

Struts2 Login/Register with facebook

I've recently found an open source library that does, post on a users facebook wall(restfb and facebook4j)
All of them does the necessary things, but there's one thing left I need to do and that is to login and register users to my web application using their facebook account. are there any related frameworks for such task? if not, please provide alternative solutions
If i am correct in my understanding, all you want is to use Oauth or Open Id system to let user register and login to your website using Facebook or any other such service provider.
If i am correct in my understanding, there is a very good library which is quite easy to use and very light weight.
Scribe-Java
It also contains few examples which shows how to use it and how it works, let us know if this is what you are looking.

How to mimic Facebook's "Like" feature in WebSocket

I developed a proof of concept application that uses WebSocket to mimic the functionality of Facebook.
If on Facebook someone "likes" a picture, I see the notification on my page right away without me refreshing the page. Is this being done by WebSocket? What strategy is this adopting - pub/sub?
The application I developed is in Java and I came across Atmosphere Framework. I'm not sure which sample I should review from their vast list of examples on GitHub to accomplish what I'm trying to do.
Without Facebook API, we'll have to find a certain way:
On a dedicated server, since you are not using Facebook API, I would use an auto refresher that refreshes the Facebook page every interval of time and put the number of likes in a database.
Then, use AJAX on your website that communicates with a PHP file on server.

Adding user authentication in java web app

I need to authenticate the users who visit my java based web app (Servlets and JSP) using different social media like facebook, twitter, google and yahoo.
Is there any open source library which solves this problem? Instead of working on different API's an open source java library would be helpful.
The guys from SpringSource have a library doing what you ask for, called Spring Social. The linked blog article explains what it does with some nice examples. But the project is still in beta (even though the quality of their deliverables has always been rock solid).
Take a look at openid4java.
This library allows you to OpenID-enable your Java webapp.
You can use Open ID with openid4java.

Categories

Resources