Using Temboo choreos in Processing

edited November 2013 in Library Questions

Hi , I'm trying to use any of Temboo Choroes in Processing but every time I run my code I get and error about Libraries not found ,

example :

//load base Temboo Library
import com.temboo.core.*;


//load specific Choreos and Bundles
import com.temboo.Library.Flickr.*;
import com.temboo.Library.Flickr.Photos.SearchPhotos.*;
import com.temboo.Library.Flickr.Photos.*;


//declare Temboo session
TembooSession session;

void setup() {
  //initialize Temboo session with account
  initializeTemboo();
  duckduckgo();

}

//log in to your Temboo account
void initializeTemboo() {
  try {
    session = new TembooSession("alless", "myFirstApp", "################"); //Insert your info here
  }
  catch (Exception e) {
    println("Temboo login failed.");
  }

}


void Flickr() {
  try {
// Instantiate the Choreo, using a previously instantiated TembooSession object, eg:
// TembooSession session = new TembooSession("alless", "APP_KEY_NAME", "APP_KEY_VALUE");
  SearchPhotos searchPhotosChoreo = new SearchPhotos(session);

// Get an InputSet object for the choreo
  SearchPhotosInputSet searchPhotosInputs = searchPhotosChoreo.newInputSet();

// Set credential to use for execution
  searchPhotosInputs.setCredential("Flickr");

// Set inputs
  searchPhotosInputs.set_Text("tehran");

// Execute Choreo
  SearchPhotosResultSet searchPhotosResults = searchPhotosChoreo.execute(searchPhotosInputs);

  println(searchPhotosResults);
  }
  catch (Exception e) {
    println("Flickr error encountered");
  }
}

and here's the error I get : No library found for com.temboo.Library.Flickr No library found for com.temboo.Library.Flickr.Photos.SearchPhotos

Answers

  • Where are the libraries you're loading? If I recall correctly, to use pure Java libraries in Processing you need to have the library JAR in a folder named code at the root of your sketch.

  • well according to this article : http://support.temboo.com/entries/23452538-Using-Temboo-with-Processing I just imported its library , and it should work ... dont know why :/

  • Answer ✓
    1. Even if the forum asks you, don't reject helpful answers! :-O

    2. This belongs to the Questions about Libraries section, obviously (or, perhaps, the Arduino one, not too sure). Will move it.

    3. You assume everybody knows about this library / hardware. This can limit your audience... The link you provide in your second message should have been given in the first one. :-)

    4. What do you mean by "I just imported its library". How did you do that? The instructions given by velvetkevorkian are good, for one sketch. Those in the page you link to are good if you need to use the library in several sketch.

    5. Side note, aimed at the creators of the library, not at you: a package like com.temboo.Library.Flickr.Photos.SearchPhotos.* is awful. At least, it justs stomps on the Java recommendations about package names (all lowercase).

    6. I see this library supports many sub-libraries, perhaps you need to install specifically the one you need (Flickr).

Sign In or Register to comment.