开发者

Find profile url in Facebook

Im writing an app for facebook in java. i have a class named FacebookClient that i got from facebook. withe this class i can connect to facebook by using

FacebookClient  client = new FacebookClient();
client.login(request, response, "api_key", "sec_key");

and get user info with client.users_getinfo (For e开发者_运维问答xample: client.users_getinfo(String.class, uidJSON, "first_name , last_name , sex , pic_big , pic_small ", "format=json");

the problem is that i need the user profile url and i can't get it!!

does anyone know how to get it (the function or the Query )

Thanks


Check out the Facebook Graph API here

If you make an API call me it will return a large JSON containing various information about you, (or a specified user), and one of the entries is 'link'

Here is a sample call. https://graph.facebook.com/me?access_token=<the access token>

and the sample return will look like:

{
   "id": "01234567",
   "name": "Kenny Cason",
   "first_name": "Kenny",
   "last_name": "Cason",
   "link": "http://www.facebook.com/kenny.cason",
   "about": "life only comes once",
   "birthday": "00/11/2222",
   "location": {
      "id": "110184922344060",
      "name": "Washington, District of Columbia"
   },
   ... 
      a bunch more info
   ...
}

You can see the link entry which is a link to my facebook profile. let me know if you need more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜