ianlee-dev / facebook-java-api

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

I am not getting album names list #146

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi all,

I am facing a problem in retrieving photo album names of a particular user
to our application.

we are using  facebook-java-api-2.0.3 version

""""
String apiKey =
MobileServerConfiguration.getProperty
("Configuration/FacebookDetails/FacebookAPIKey").trim();
String secret =
MobileServerConfiguration.getProperty
("Configuration/FacebookDetails/FacebookSecret").trim();
FacebookXmlRestClient client = new FacebookXmlRestClient( apiKey, secret,
mobileServerContext.getUser().getFacebookSession());
String authToken = httpServletRequest.getParameter("auth_token");

Long userId = client.users_getLoggedInUser();
logger.info(userId);
org.w3c.dom.Document doc =client.photos_getAlbums(userId);
logger.info(doc);

List<String> facebookAlbumList = FacebookSynchronization.getAlbums(doc);
logger.info(facebookAlbumList);  """"

 This is the code we are using 

We are retrieving client object by passing arguments (api key,secret key
and facebook session ) form that client object we are getting the 'userId'
 (Long userId = client.users_getLoggedInUser(authToken);)

then by passing "userId"  as argument we have to get XML object but we are
getting it as null (org.w3c.dom.Document doc
=client.photos_getAlbums(userId);) in this "doc" is XML object but we are
getting it as "NULL

Original issue reported on code.google.com by shivaramaraju on 2 Dec 2008 at 5:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
can you turn up the debug and put that up?

Original comment by fern...@gmail.com on 2 Dec 2008 at 8:20

GoogleCodeExporter commented 8 years ago
it works fine for me. I have wrote some tests and they are passed.

Original comment by rdmytre...@gmail.com on 4 Dec 2008 at 2:43

Attachments:

GoogleCodeExporter commented 8 years ago
Could you please post a JUnit test if you've seen this working. I can then add 
the
JUnit test to the project and close the issue.

Original comment by david.j....@googlemail.com on 17 Dec 2008 at 9:10

GoogleCodeExporter commented 8 years ago
I have attached patch ('photoablum_tests.patch') with tests in my previous 
post. What
is wrong?

Original comment by rdmytre...@gmail.com on 17 Dec 2008 at 9:14

GoogleCodeExporter commented 8 years ago
Apologies, I missed that. I'll run the test myself and add it to the project...

Original comment by david.j....@googlemail.com on 17 Dec 2008 at 9:17

GoogleCodeExporter commented 8 years ago
JUnit proves that this works in 2.0.3. Please review PhotoAlbumTest for 
examples of
how to use the feature. Thanks for the test patch!

Original comment by david.j....@googlemail.com on 18 Dec 2008 at 10:12