Yammer JavaScript SDK : "Expected identifier, string or number"

180 views Asked by At

I have followed the guidance available from the JavaScript SDK. I have registered an app and used the supplied App Id as indicated in the web page include statement for the SDK:

<script type="text/javascript" data-app-id="...appid..." src="https://c64.assets-yammer.com/assets/platform_js_sdk.js"></script> 

I get the following error when the page loads:

SCRIPT1028: Expected identifier, string or number

File: platform_js_sdk.js, Line: 25, Column: 21658

Can anyone provide insight into why I might be receiving this error?

2

There are 2 answers

1
Vinay Bhatia On

I left a comment before, but looks like it never got posted.

We are facing same issue, and found the solution and the fix.

SharePoint 2010 master page includes which causes Yammer API to break. Replacing with fixes it, but we need to test impact on other SharePoint 2010 functionality before we do the change.

0
Jan Tanis On

I think it is due to te use of for as a property name. As for is a reserved keyword in JavaScript:

.extend({propFix:{for:"htmlFor",class:"className"}

I guess the same will apply for class as of ECMA script 5.

http://www.w3schools.com/js/js_reserved.asp