开发者

Request Dialog - JavaScript Example - Does not work in internet explorer

I am following the example in the facebook Javascript SDK

It works fine in Chrome, but for some reason, when i run the same code in Internet explorer, I get a Javascript error.

I want to allow users of my app to send invites to use the application.

Anyone else have this problem or have a workaround?

Here are my error details (well what i could get anyway):

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; FDM) Timestamp: Tue, 27 Sep 2011 18:09:30 UTC

Message: Expected identif开发者_如何学Cier, string or number Line: 38 Char: 9 Code: 0 URI: http://someplace:5000/InviteFriends2.aspx

Message: Object expected Line: 20 Char: 1 Code: 0 URI: (same as above URI)



They have trailing commas in the examples which is not a good thing to do. Remove them.

  function sendRequestToOneRecipient() {
    var user_id = document.getElementsByName("user_id")[0].value;
    FB.ui({method: 'apprequests',
      message: 'My Great Request',
      to: user_id,   <-- Trailing comma
    }, requestCallback);
  }

  function sendRequestToManyRecipients() {
    FB.ui({method: 'apprequests',
      message: 'My Great Request', <-- Trailing comma
    }, requestCallback);
  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜