huuanh1987 / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

Problem in getting User Friend's Data #225

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by imve...@gmail.com on 21 Jul 2009 at 1:26

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. I have created an extended session key from FacebookXmlRestClient.
2. Created client using this : client = new FacebookXmlRestClient(apiKey, 
secretKey, 
offlineSessionId);
3.  Then written following code snippet:
    client.beginBatch(); 
    client.users_getLoggedInUser(); 
    client.friends_get();
    List<? extends Object> batchResponse = client.executeBatch(false);
    FriendsGetResponse friends = (FriendsGetResponse)batchResponse.get(1);
    System.out.println("Friends: " + friends);

What is the expected output? What do you see instead?

    Friends list should be returned. Instead I'm getting null.

What version of the product are you using? On what operating system?

    I'm using facebook-java-api-2.1.1.jar (s) on Windows XP.

Please provide any additional information below.

    I have also tried with the following:

FacebookJaxbRestClient jClient = new FacebookJaxbRestClient(apiKey, secretKey, 
offlineSessionId)

    Still getting the null value for friends data.

    But I'm able to get logged in user's data correctly using the following code 
snippet.

     client = new FacebookXmlRestClient(apiKey, secretKey, infinteSessionId);

     Document userInfoDoc = client.users_getInfo(uids, fields);

Original comment by imve...@gmail.com on 22 Jul 2009 at 11:52