How to get another user's details using RestFB?

How to get the details of the user using restfb.?

  • I am trying to get the lastname of my profile using restfb.But but each time the username is returned as null.I already have the acess token and permissions.I guess t some problem with the JSon object passing.how can i pass the json objects to a javabean and later retrieve it?

  • Answer:

    This works for me: FacebookClient facebookClient = new DefaultFacebookClient(MY_ACCESS_TOKEN); User user = facebookClient.fetchObject("me", User.class); out.println("Last name: " + user.getLastName());

sandeepsharat at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.