2009-06-03 12 views

risposta

2

Spring Social è ottimo ma funziona solo con Spring Framework 3.0+. Quindi, guardare la tua versione di primavera, perché ho provato due giorni per capire come far funzionare primavera sociale con Spring Framework 2.5;)

0

È possibile utilizzare grafico Facbook API per richiedere informazioni agli utenti e di analizzare in questo modo:

 JSONObject resp = new JSONObject(content); 
     String facebookid = resp.getString("id"); 
     String firstName = resp.getString("first_name"); 
     String lastName = resp.getString("last_name"); 
     String email = resp.getString("email"); 
     String phone = resp.getString("mobile_phone"); 

     JSONObject address = resp.getJSONObject("address"); 
     String street = address.getString("street"); 
     String city = address.getString("city"); 
     String zip = address.getString("zip"); 
     String state = address.getString("state"); 
     String country = address.getString("country"); 

Dopo aver chiamato le stringhe, il metodo di registrazione dovrebbe essere semplice. Di te devi solo autenticarli.

ho postato maggiori informazioni su questo qui: Facebook Connect example in JSP (tomcat)

Problemi correlati