1

I m trying to add addrequest on an external site with facebook connect

I get the JS following error:

invalid quantifier

crash line:

FB.provide('Cookie',{_domain:null,_enabled:false,setEnabled:function(a){FB.Cookie._enabled=!!a;if(typeof a=='string')FB.Cookie._domain=a;},getEnabled:function(){return FB.Cookie._enabled;},loadMeta:function(){var a=document.cookie.match('\\bfbm_'+FB._apiKey+'=([^;]*)\\b'),b;if(a){b=FB.QS.decode(a[1]);if(!FB.Cookie._domain)FB.Cookie._domain=b.base_domain;}return b;},loadSignedRequest:function(){var a=document.cookie.match('\\bfbsr_'+FB._apiKey+'=([^;]*)\\b');if(!a)return null;return a[1];},setSignedRequestCookie:function(a,b,c){if(!a)throw new Error('Value passed to FB.Cookie.setSignedRequestCookie '+'was empty.');if(!FB.Cookie.getEnabled())return;if(c){var d=FB.QS.encode({base_domain:c});FB.Cookie.setRaw('fbm_',d,b,c);}FB.Cookie._domain=c;FB.Cookie.setRaw('fbsr_',a,b,c);},clearSignedRequestCookie:function(){if(!FB.Cookie.getEnabled())return;FB.Cookie.setRaw('fbsr_','',0,FB.Cookie._domain);},setRaw:function(a,b,c,d){if(d){document.cookie=a+FB._apiKey+'=; expires=Wed, 04 Feb 2004 08:00:00 GMT;';document.cookie=a+FB._apiKey+'=; expires=Wed, 04 Feb 2004 08:00:00 GMT;'+'domain='+location.hostname+';';}var e=new Date(c).toGMTString();document.cookie=a+FB._apiKey+'='+b+(b&&c===0?'':'; expires='+e)+'; path=/'+(d?'; domain='+d:'');}});
Sahil Mittal
  • 20,697
  • 12
  • 65
  • 90
Nico AD
  • 1,657
  • 4
  • 31
  • 51
  • hmm. your crash line is like 30 lines of code. Why don't you space them out so you can figure out which particular piece of code is an actual error? also, the error you are getting is usually given regarding a regex. see http://stackoverflow.com/questions/3713290/javascript-invalid-quantifier-in-regex – Michael Pryor Feb 20 '12 at 14:55
  • well, I used a different method and the problem disappear. note that the problem is a JS file from facebook , not mine – Nico AD Feb 20 '12 at 15:19

0 Answers0