Sunday, April 10, 2011

JavaScript Woes!

More research is required for ole Beardy. The oracle is finished (or at least close enough to being finished), but the facebook javascript sdk parts of the application have been nightmare. All I want to do is just create a little share function that I can call on from an html button. Shouldn't be hard, right? Wrong.

I used the example stream.publish function from the sdk files and modified it to my own ends. It works... in Firefox. Google Chrome finds a javascript error inside of facebook's all.js file. Initially, I thought that maybe Chrome utilized innerHTML in a different manner, but a quick test disproved that notion. I was able to call the same ids from my a test function, so nothing is wrong with the way I'm passing values. The debugger traces it back to line 18 of all.js.

But it gets worse: Internet Explorer stops responding whenever I try to include external javascript files. I must be doing something wrong on that end. I'm really not sure. I've got it in the head section of the document.write html... maybe (like Chrome), it needs the file in the body. This would be odd, as I seem to recall IE crashing for the same reason. Again, confused and frustrated!

But it gets even worse: I just learned that Facebook is in the process of deprecating stream.publish, so even if I get it working, I'll just have to switch it to the graph API (whatever the hell that is).

No comments:

Post a Comment