Click here to Skip to main content
15,885,638 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
hi...
I have a website.. in that I put a facebook login and I get facebook user credentials by using http://www.codeproject.com/script/Articles/ViewDownloads.aspx?aid=371917[^] giving code. When I using this code only app created user email,DOB values getting but other persons values doesn't comes. How can I solve this type of problem.. please help me....

thank you....
Posted
Updated 28-Jun-12 8:41am
v3
Comments
Herman<T>.Instance 28-Jun-12 11:13am    
uhhhh...what is your exact problem?
Rajeev Jayaram 28-Jun-12 11:28am    
Your quesiton is unclear. Improve the question.
Sandeep Mewara 28-Jun-12 11:32am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

Based upon the same question you asked here[^], I see that the error you are getting is "Object reference not set to an instance of an object". This error occurs when you do not properly instantiate a class object. For instance, if you have a class Foo and you want to assign it to a variable bar, this would not work:
C#
Foo bar;
bar.Run();

Instead, you would see this same error (as long as this class exists). Instead, you need to instantiate the variable like this:
C#
Foo bar = new Foo();
bar.Run();

Somewhere in your code, you are using a class reference without first instantiating it. If you identify which variable it is griping about, you will find your answer.

My recommendation would be to take the code from the article you referenced and try to get the demo working. Once it is working, then try to recreate it (not something new - the same thing). Once that works, try implementing this code in your application. Along the way, you are going to see where you deviated from what the author did.

Update
For the actual Facebook data, I believe you are bumping against the need for extended Facebook permissions. Facebook doesn't give you access to all the data you can see on the screen via API without extended permissions. You will need to register your application and ask people for access to their data. Here is a link with more information:

http://developers.facebook.com/docs/authentication/permissions/[^]
 
Share this answer
 
v2
Comments
NaniCh 28-Jun-12 15:49pm    
thank you for your help...
i got the username,firstname,lastname values but Email,DOB doesn't comes..
there is no object reference doesn't come any value.....but i had some values..
whats is error..please help me...
Tim Corey 28-Jun-12 15:51pm    
Look in the JSON data you get back from Facebook. If it isn't there then you aren't requesting it correctly or Facebook isn't allowing it to go through. If it is there, look at the name so you can reference it properly in your code.
NaniCh 28-Jun-12 18:16pm    
in JSON data displayed Email,DOB only app created person and other persons data doesn't display..

i want code for to integrating facebook login into my website and getting firstname,lastname,email,location,DOB values...please help me....
Tim Corey 28-Jun-12 19:27pm    
I've updated my post with more info.
Wonde Tadesse 28-Jun-12 20:01pm    
5+
Take a look at the FaceBook API(Authentication[^]) documentation. It's been clear described the things need to be used in order to integrate the FaceBook API to your website. However you may not get all the information that the user has in FaceBook account.
Facebook Developers document says

By default, we give you access to the user's name, picture and any other data they have shared with everyone on Facebook (see the User Graph object for more details)...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900