i want to get user's birthday, it's current hometown, user's local language and it's current location for that i develop this code this but it seems to be doens't worked.
function LoginFacebook() {
FB.login(function (response) {
if (response.authResponse) {
FB.api('/me', function (response) {
location.value = response.birthday;
alert(location.value);
city.value = response.hometown;
alert(city.value);
language.value = response.user_likes;
alert(language.value);
birthday.value = response.user_birthday;
alert(birthday.value);
});
i already got the first name, last name, email and fbid but i can't get the location, city, birthday and language from facebook api when i try to get those fields when i use above code and alert the fields value it shows undefined............................
Hardik Parma...
0 Points
3 Posts
how to get location, birthday, city and language fields from facebook api
Dec 26, 2012 08:33 AM|LINK
i want to get user's birthday, it's current hometown, user's local language and it's current location for that i develop this code this but it seems to be doens't worked.
function LoginFacebook() { FB.login(function (response) { if (response.authResponse) { FB.api('/me', function (response) { location.value = response.birthday; alert(location.value); city.value = response.hometown; alert(city.value); language.value = response.user_likes; alert(language.value); birthday.value = response.user_birthday; alert(birthday.value); });please suggest if you have any suggestion
SohailShaikh
Contributor
6119 Points
1167 Posts
Re: how to get location, birthday, city and language fields from facebook api
Dec 26, 2012 11:38 AM|LINK
check these link
http://www.codeproject.com/Articles/450535/Using-Facebook-login-in-ASP-NET-application-withou
http://vatlab.com/facebook-login-button-asp-net
http://www.aspsnippets.com/Articles/Login-with-FaceBook-account-in-ASPNet-Website.aspx
Sohail Shaikh
Hardik Parma...
0 Points
3 Posts
Re: how to get location, birthday, city and language fields from facebook api
Dec 27, 2012 04:22 AM|LINK
i already got the first name, last name, email and fbid but i can't get the location, city, birthday and language from facebook api when i try to get those fields when i use above code and alert the fields value it shows undefined............................
vbodro
Member
276 Points
58 Posts
Re: how to get location, birthday, city and language fields from facebook api
Dec 27, 2012 09:00 PM|LINK
You have to request additional permissions for this fields, check the list:
http://developers.facebook.com/docs/authentication/permissions
Pro ASP.NET Controls for Facebook applications, Facebook Connect, and Facebook Pages
Hardik Parma...
0 Points
3 Posts
Re: how to get location, birthday, city and language fields from facebook api
Dec 28, 2012 12:10 PM|LINK
Hey thanxx for the suggestions but i already get the solution for that.
i had done some silly mistakes
i have to wrote reposnse.hometown.name in place of response.hometown and it simply worked...