Your Location is: Home > Eclipse

play framework 2.1.1 - package com.restfb does not exist

From: Portugal View: 1878 user4695032 

Question

I'm using play framework 2.1.1, and I want to add to a project restfb in order to use Facebook graph.

I added restfb-1.9.0.JAR to eclipse, then I right clicked on it, and chose build path->add to build path.

However when I'm trying to write some code, and use the restfb package, I'm getting an error code on the browser.

This is the error:

error: package com.restfb does not exist

On the line:

import com.restfb.FacebookClient;

Any idea on how I can fix this? Thanks

Best answer

Copy your libraries into the lib folder in your project folder. If the lib-folder does not exist, create it.

The Play Framework includes all jars in the lib-folder when building/compiling your app. Adding it to the eclipse-build-path is not enough.