ianlee-dev / facebook-java-api

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

Profile information is returned NULL using "users_getInfo" #153

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an instance of FacebookXmlRestClient with apikey, secretkey and
sessionkey .
2. call method users_getinfo .
3. XPath to extract the first_name and last_name on returned Document.

What is the expected output? What do you see instead?
first_name and last_name Node should be returned on applying XPath over the
document. expression returns NULL for both

What version of the product are you using? On what operating system?
I am using 2.0.3 release on a Linux box "Red Hat Enterprise Linux 5.2"

Please provide any additional information below.

I am attaching a TestCase for the mentioned problem.
I converted the Document (returned to me by the API "users_getInfo") again
to XML and saved it in a File. Again read the file and generated a Document
out of it and this time I was able to get the first_name and last_name from
the document, which very weird. Can somebody look into this??

Original issue reported on code.google.com by rajpal.c...@gmail.com on 19 Dec 2008 at 10:26

Attachments:

GoogleCodeExporter commented 8 years ago
It's not a bug. 

First of all, try log facebook response using client.getRawResponse();   

You're using xpath selectors without namespaces. I can't provide right xpaths, 
but
you can disable namespace. Just call 
FacebookXmlRestClient client = ...; 
client.setNamespaceAware( false ); 
and test is passed.

David, I have modified this test and you can add it to other one. Look at 
attach. 

Original comment by rdmytre...@gmail.com on 19 Dec 2008 at 5:13

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks A lot! I have tested it and it is working perfectly fine... Thanks again 
for
the Info... :-)

Original comment by rajpal.c...@gmail.com on 19 Dec 2008 at 9:21

GoogleCodeExporter commented 8 years ago
If there's anything left to do on this, please reopen and comment. It may be 
worth
taking a look at the FacebookNamespaceContext class to see how you can use 
XPath with
namespaces successfully.

Original comment by david.j....@googlemail.com on 21 Dec 2008 at 6:47