My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
FAQ  
Frequently Asked Questions
Updated Jul 14, 2010 by fern...@gmail.com
  • How do I switch on debug logging so that I can see what's going on more clearly?
    • javax.util.logging is far more difficult to get to grips with than log4j, so let's do this with log4j. Firstly, declare a dependency on log4j:log4j:1.2.15 or later in your project by adding a dependency in your pom.xml file. Then, place a log4j.xml file like this one in your classpath. Once that's done, you'll be able to control the root logger and set everything to debug level. Alternatively, you can add other loggers and only debug certain packages or classes. There's loads of information on how to configure log4j on the web.
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.15</version>
    </dependency>
  • When requesting an XML document from Facebook, I get nothing back. I see [#document: null] in my debugger.
    • [#document: null] isn't nothing! The .toString() method on the Document object is trying to communicate that the Document's root element's "node value" is not defined. Unfortunatly, it chooses to represent that as [#document: null] which is just plain confusing. Use the com.google.code.facebookapi.XMLTestUtils.print(Node dom); utility method which is checked into the facebook-java-api source tree to pretty-print your Document and see what's really in there.
  • I'm seeing: com.google.code.facebookapi.FacebookException?: Invalid parameter
    • Check whether your Desktop Mode setting is what you expect it to be. If in doubt, you probably want Web. The Desktop Mode discussion document has plenty of details about this potential problem.
  • I want to contribute. How do I get my hands on the code for this project and build it in Eclipse?
  • I want to contribute. How do I get commit rights to SVN so that I can check my changes in?
    • The normal procedure (with pretty much all open source projects) is.
      • Please identify a change you'd like to make, either a bug fix or a new feature.
      • Post an issue for it, if one doesn't already exist, and upload a patch file containing your changes.
      • Alert developers on the mailing list that there's an improvement ready to go in.
      • One of the existing developers will be happy to apply your changes and, if it's well thought out and high quality, give you commit privileges so that you can do it yourself next time.
    • Looking forward to having you onboard! :)
  • Does the Facebook Java API work on J2ME for mobile devices?
    • No. The Facebook Java API uses Java SE 5 Generics and a significant number of other J2SE features like JAXB which we wouldn't want to be without. Making a library compatible with J2ME involves making significant sacrifices in order to get the benefit of the product working on mobile devices. There are therefore no plans to get the Facebook Java API in its current form working with J2ME. A separate project has been proposed on the forum; please search the forum for more details.
  • Does the Facebook Java API run on Google Android phones?
  • Why does the Facebook API only work for my account, not with anyone else's username and password?
    • You've most probably got your application settings as set to "Sandbox" which only allows developers that you name to have access using your API_KEY. Check your application settings.
  • Where are the latest snapshot .jar files held? I just want to get the files and use them rather than using Maven to get them for me.
  • I'm having trouble building the facebook-api-annotation-processor module. It's complaining about not finding com.sun.mirror.* classes. What's missing?
    • Java 5 facebook annotation processors depend on you having JDK_DIR/lib/tools.jar on your build classpath. If you take a look in the pom.xml for the facebook-api-annotation-processor module you'll see:
    • <dependency>
          <groupId>java</groupId>
          <artifactId>tools</artifactId>
          <version>1.5.0</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
      </dependency>
    • Make sure that your Maven is running using a JDK so that ${java.home} so that the relative link to tools.jar works. If all else fails, just hardcode an absolute path to where you know there's definitely a tools.jar.
    • The same sort of hack may be required for allowing the builder to locate apt when building the main project. Mac OSX users specifically are affected, since Apple decided it needed to totally screw up the way JDKs are installed.
Comment by avi.rubi...@gmail.com, Jan 24, 2010

How can i get friend's list of other users than the logged in user . I can only query the logged in user info.

Comment by ganesh.k...@gmail.com, Jan 28, 2010

Facebook stopped supporting get the friends list of other users. The only friends list you can get is the logged in user.

Comment by rpw...@gmail.com, Jan 28, 2010

I am trying to check out the latest source but several classes seem to be missing! For example, upon checkout I can't see FacebookJsonRestClient?.java, only FacebookJsonRestClientBase?.java. Any help would be appreciated!

By the way, folks, you are doing a great job with this library.

Comment by ISP...@gmail.com, Feb 8, 2010

I am very interested in developing a facebook application using java on a mac. Can anybody direct me to a good tutorial on how to set everything up? Thanks.

Comment by manster...@gmail.com, Feb 9, 2010

I'm in the same boat as the above guy except i'm using linux. and i really have no clue how to set everthything up. if i can set it up. then i cant even use it and the examples on the site become useless

Comment by ayeshasi...@gmail.com, Feb 18, 2010

I'm stuck with "Incorrect signature" exception. Could anyone please give me clue about desktop application using java api??

Comment by thehurda, Feb 26, 2010

What about Google App Engine - is this library compatible with it?

Comment by ganesh.k...@gmail.com, Mar 1, 2010

Why checkout source if you are just interested in developing applications? Just download the jar file, drop it in your library folder and you are all set.

Comment by obji...@gmail.com, Mar 9, 2010

I too have checked out the source and maven-ed the project and there is a missing file for FacebookXmlRestClient?.java.... WTF? The base class is there but not that source file, which is exactly the file I wanted to study the implementation of.

How is this supposed to help us build from sources if files are missing.

This is not the standard I have come to expect from this site having used many other offerings in the past! Come on somebody, fix it please!

Comment by vivadrev...@gmail.com, Mar 17, 2010

perubahan cepat

Comment by gan...@gmail.com, Apr 20, 2010

SEVERE: Servlet.service() for servlet ISearchServlet threw exception java.lang.Error: Unresolved compilation problem:

The method setIsDesktop(boolean) is undefined for the type FacebookJsonRestClient?

at com.eatables.facebook.ISearch.doGet(ISearch.java:47) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:690) at javax.servlet.http.HttpServlet?.service(HttpServlet?.java:803)

I am getting this error, help me !

Comment by tikamcha...@gmail.com, Apr 21, 2010

API for J2Me? Appliction

Comment by soph....@gmail.com, Apr 24, 2010

Can anyone point me in the right direction, I have a Java application that through FacebookJsonRestClient? need to invite selected friends, but seeing that the notifications_send has been deprecated, i am stuck.

thanks sophia

Comment by georgo...@gmail.com, May 18, 2010

can u explain, how to add the binaries as reference in javascript. any body please help me

Comment by david.bo...@gmail.com, May 26, 2010

First of all, you guys did a good job! I appriciate for your efforts and hard work!

I have three questions now: 1.) Is there a tutorial about how to use this API? 2.) why there're two Java Docs, one for the project and another schema JAXB? 3.) I would like to post a message to a logged-in user's wall. How can I obtain a session key for this user, given an application API key and secret? which classes can help me to do this type of job? Thanks!

Comment by loconno...@gmail.com, Aug 26, 2010

Is this api actually working anymore? There are posts on the internet that say it isn't. If not I think it would be worth mentioning here so we don't waste our time!

If you have gone to the trouble to write this why not also include a simple example! With simple installation instrucations, e.g. these are the jar files you'll need, here is simple code that shows you your friends or something!

Comment by guido.laures, Aug 28, 2010

I am also facing a lot of issues in my app. It worked until some weeks ago and now it stopped working. I updated to the newest API but still no luck. Always get a Message Failed exception when trying to post a stream...

Comment by abulbul...@gmail.com, Jan 7, 2011

I need to use this API to simply make content posts to the wall to owned user (oauth cred login). Will be supplying a url for the content and possibly a 'comment'. Are there any examples somebody can direct(link) me to? Thanks

Comment by vineet...@gmail.com, May 16, 2011

Does this API support OAuth 2.0, recommended way of using facebook connect?

Comment by llmorex, Jul 4, 2011

can i develop using java se?

Comment by soley.pu...@gmail.com, Aug 19, 2011

hi. i dont know anythin about this. I would like to know how can i make an example

Comment by daniel.b...@gmail.com, Oct 22, 2011

Hi, could anyone tell me how long the facebook session is valid ? If a User registers on my webpage and I want to retrieve his comments on a weekly basis ... do I have hoim to authenticate everytime or is it possible to reuse the session key?

Comment by auduwage, Nov 19, 2011

Hi, With this api is it possible to get my friends status along with the replies for those status...? Thanks.

Comment by suyash.s...@gmail.com, Nov 21, 2011

Can any one please tell me how i can integrate Facebook with J2me or Lwuit.its urgent.

Thanks & Regards

Comment by sushma.R...@gmail.com, Dec 12, 2011

hi i am developing a j2me application where the user can login with facebook credentials. Could anyone please help me how to achieve this i could not find any web services / url(which connects to the facebook api and gives the response back).Thanks in adveance.

Comment by nixi...@gmail.com, Jan 30, 2012

is it useful with android?


Sign in to add a comment
Powered by Google Project Hosting