问题
Actually I want to extract basic(Public Profile) information of a person on Facebook by it's name or email-ID without any type of authentication. So, can anyone tell me the detailed procedure how i can acheive this using Java Programming and i want the result in XML format
回答1:
https://graph.facebook.com/4
Will give you a result similar to -
{
"id": "4",
"name": "Mark Zuckerberg",
"first_name": "Mark",
"last_name": "Zuckerberg",
"link": "http://www.facebook.com/zuck",
"username": "zuck",
"gender": "male",
"locale": "en_US"
}
That will give you all the public information about a user. The response you get is a JSON object. If you want it in XML you'll have to manually convert it.
Beaware that not all USER_ID's will return information. It all depends on the user's privacy settings.
I have no knowledge of JAVA so I can't give you and code samples, but you can make a simple HTTP request to that URL using whatever methods you feel comfortable with...
来源:https://stackoverflow.com/questions/11492236/facebook-api-for-extracting-basicpublic-profile-info-of-a-person