Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Highlighted
Developer
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi
Accepted Solution

Facebook OAuth Sample - Getting Birthday

I've gotten the Facebook example from the WebWorks samples working fine. 

 

I want to instead of saying Hello 'name' ! display user's birthday instead. 

 

So I change line 101 in oauth.js from ...

 

showMessage('Hello ' + data.name + '!');

 

to 

 

showMessage('Hello ' + data.birthday + '!');

 

 

When I try this I get back undefined for birthday. How would I go about getting the user's birthday?

_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis
Developer
Posts: 676
Registered: ‎05-06-2012
My Device: Dev Alpha & PlayBook
My Carrier: wifi

Re: Facebook OAuth Sample - Getting Birthday

Solution is to add user_birthday to line 53 thus authorizing to app to access that data ...

window.location.replace('https://www.facebook.com/dialog/oauth?client_id=' + facebookOptions.clientId + '&redirect_uri=' + facebookOptions.redirectUri + '&scope=publish_stream,read_stream,user_birthday');
_________________________________________________________
co-founder of Diaree | BB Dev for PictureThis