0

I am trying to start working with the Behance API, I have following scripts included:

bundles.Add(new ScriptBundle("~/x1").Include("~/scr/jquery.js", "~/scr/jqueryui.js",));
bundles.Add(new ScriptBundle("~/x2").Include("~/scr/backbone.js", "~/scr/underscore.js", "~/scr/be.js"));

In be.js:

Behance = {
api_url : 'http://www.behance.net/v2/',
api_key: 'asgasgasgasga9s8g…'
};

Then on my page I have this:

@Scripts.Render("~/x1")
@Scripts.Render("~/x2")

<script>
// Set your API key in be.js
//Behance.api_key = // have set this in be.js

// Users
BehanceUser = new Behance.UserModel({ user: ‘UserName’ });
BehanceUser.fetch();
BehanceUser.getProjects();
BehanceUser.getCollections();
BehanceUser.getWips();
</script>

But I am receiving following errors in my Chrome console:

Uncaught TypeError: Cannot call method 'each' of undefined 
Uncaught ReferenceError: Behance is not defined 

Can anybody tell me where I am making a mistake?

Maven
  • 14,587
  • 42
  • 113
  • 174

0 Answers0