Facebook API for extracting basic(Public) profile info of a person

馋奶兔 提交于 2019-12-25 00:24:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!