Skip to content

Instantly share code, notes, and snippets.

@joshsmith
Created November 6, 2010 23:39
Show Gist options
  • Save joshsmith/665808 to your computer and use it in GitHub Desktop.
Save joshsmith/665808 to your computer and use it in GitHub Desktop.
// Get 100 interest recommendations from Directed Edge
$de = new DirectedEdgeRest();
$item = "user".$uid;
$limit = 100;
$tags = "interest";
$recommendedInterests = $de->getRecommended($item, $tags, $limit);
$recommendedInterestsCount = count($recommendedInterests);
// Get 100 question recommendations from Directed Edge
$de = new DirectedEdgeRest();
$item = "user".$uid;
$limit = 100;
$tags = "question";
$recommendedQuestions = $de->getRecommended($item, $tags, $limit);
$recommendedQuestionsCount = count($recommendedQuestions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment