Okay I must confess I got a bit confused now.
What I am doing is that I follow this guide:
"It's really easy with the Facebook Graph API. Sign in to Facebook and
navigate to the Graph API documentation. Click on the "Example" link
that shows Graph API JSON data. You should see an access_token
parameter in your URL bar. That's it! Just copy and paste it into your
code."
I get my accessToken and i pass it in my java desktop application. (I
haven't made an application on Facebook).
FacebookClient facebookClient = new
DefaultFacebookClient(accessToken);
User user = facebookClient.fetchObject("me", User.class,
Parameter.with("metadata", 1));
The method getWork() requires user_work_history permission and
getMobilePhone() requires user_mobile_phone permission. I have never
asked for any of those permissions on my code. Why am I able to get
result from user.getWork(); and not from user.getEmail(),
getMobilePhone() and getAddress();?
According to
http://restfb.com/ I only need special permissions to
post and delete.
How can I ask for the user_mobile_phone permission on my code?
Do I really have to create a facebook application like revetkn said?
Thanks for the help
On Jan 24, 10:04 pm, Jason Peltzer <
pelt...@gmail.com> wrote:
> If you check out the examples onhttp://
restfb.com/you'll need to fetch the
> user like so:
>
> User userWithMetadata = facebookClient.fetchObject("me", User.class,
> Parameter.with("metadata", 1));
>
> which is basically:
https://graph.facebook.com/me?access_token=XXX_ACCESS_TOKEN_XXX&metad...
> What you are currently doing (I assume) ishttps://
graph.facebook.com/me?access_token=XXX_ACCESS_TOKEN_XXXwhich is the
> equivalent of:
>
> User user = facebookClient.fetchObject("me", User.class, new Parameter[]
> {});
>
> If you haven't gotten the right set of extended permissions from your app:
http://developers.facebook.com/docs/authentication/permissionsthe json will
> come back with something like this, and the description will tell you which
> extended permission you need:
>
> {
> "name": "mobile_phone",
> "description": "The user's mobile phone number. Requires the
> `user_mobile_phone` permission. A JSON string."
>
>
>
>
>
>
>
> }
> On Mon, Jan 24, 2011 at 2:49 PM, ne52 <
ne52.uop...@gmail.com> wrote:
> > You are right. The restFB logging output doesn't get those info. I
> > just supposed that since I could get all the other info, i should be
> > able to get those as well. It seems I need more permissions though,
> > through a facebook application. I will do some more research. If I am
> > able to retrieve the info I will post back here.
>
> > Thanks again. :)
>
> > On Jan 24, 9:21 pm, revetkn <
mark.a.al...@gmail.com> wrote:
> > > Does the RestFB logging output show these fields being returned to
> > > you? Keep in mind that even though you're using an access token for
> > > "you", sometimes that's not good enough - you need to use an access
> > > token for an application to which you've granted these permissions
> > > (whether this makes sense or not is debatable). Check out the
> > > documentation about this onhttp://restfb.comunderthe "A note about