FB login using prime31.?

I use prime 31 combo for fb integration, i can able to login but i don’t know how to fetch user id / username from the account after i login . Kindly help me …! thanks.

i use c# code :
if (GUI.Button(100,100,100,50),“LOGIN”)

{
Facebook.init();
Facebook.login();

/After this i want to get the userid/user name and login status/

}
thannks…

Here’s the whole OnGUI block, username will update itself once it gets back information from logging in

Facebook.init(); really should be moved to your Start() method though

    string username = "none";
	void OnGUI(){
		
		GUILayout.Label("Current User:");
		GUILayout.Label(username);
		if(GUILayout.Button("Login"))
		{ 
			Facebook.init(); 
			Facebook.login();
			FacebookManager.sessionOpenedEvent += delegate{
				Facebook.instance.getMe((response, result) => {
					username = result.name;	
				});
			};
		}
	}

There is a script making the call and receiving the response with delegates i believe.

I had to get it from inside the scripts iterating trough some request or something.
I dont have that project anymore i fear i cant not help you more.

Maybe you can debug it with Mono and breakpoints and follow the flow.

Best Regards,

Diego

Edit:

@Swaminathan You need to debug where are you receiving the Graph, token, sessionValid, etc, its a common coding practice but i know how hard is that plugin.

This is a response from Prime31: “first fetch the userID by calling the “me” Graph API call.”

And maybe this thread will guide you more:

http://forum.unity3d.com/threads/60769-Social-Networking-Plugin-(Facebook-and-Twitter)-live!/page39

Its cryptic but if you read the plugin scripts and try to understand what is he doing the better.