How can I get Logged in Facebook user’s name if I get access token using Javascipt or Jquery?Thanks in advance..
var accessToken = '';
accessToken=localStorage.getItem(facebook_token);
params='access_token='+accessToken;
$.get("https://graph.facebook.com/me",params,
function(response){
fbUesrName=response.name;
alert(fbUesrName);
},"json");
If you’re already connected via the JavaScript SDK you could do something like this:
Reference: http://developers.facebook.com/docs/reference/javascript/
UPDATE
If you have the access token of the current logged in user you can issue a HTTP GET at this URL https://graph.facebook.com/me You can then read the Json response.
Sample of jQuery code to do this:
Edit: I’m really confused now. Correct me if I’m wrong but you’re developing a web application off Facebook Canvas that is supposed to be accessed via a web browser on a Blackberry. You also don’t want to use the Facebook JavaScript SDK (why?). In order to achieve what you want you should complete all the steps below. I’m under the impression you’re trying to start directly from the last one.
https://developers.facebook.com/apps
Login:
https://developers.facebook.com/docs/howtos/login/client-side-without-js-sdk/
https://developers.facebook.com/docs/reference/login/#permissions
permission to your app and has logged in into it you can then use
the code sample I provided.