i am using drupal for facebook and make facebook connect.
its work well and when i am check the button i can get info from facebook
i can see the picture in the block.
but its dont creating a new user in drupal and i still anonymous user.
can any1 can help me plz??

Comments

visuaLatte’s picture

What page or block are you on when seeing this?

A couple things to make sure you're doing it right:

  1. Make sure you've created a Facebook app and have "registered" that app with Drupal (by entering its APP ID and other information)
  2. Once you've added the app in Drupal, click the "edit" link for that app. There should be fieldsets entitled something like "Users" and "Facebook Connect". I can't remember off the top of my head, but one of these has a "create accounts automatically" option. Make sure this is checked.
  3. Go to the user/register page. Click "Connect with Facebook". It should reload the page and redirect you to your new account's user-edit screen.

For issues surrounding what happens next, see the issue I posted here.

syossib’s picture

StatusFileSize
new44.04 KB

i looked for it everywhere....
but i dont any thuing like that...
(i attached the screenshot of the app edit)

heine’s picture

Title: CAN SUBSCRUBE TO FACEBOOK BUT ITS NOT REGISTRATE AS DRUPAL USER » Can subscribe to Facebook but not registered as Drupal user

Please do not shout.

visuaLatte’s picture

Make sure you have FB User Management and FB Registration modules enabled, as well. This may be the problem.

That said, it does appear you're on the right screen. If you enable all necessary modules, an extra fieldset should become available.

syossib’s picture

thanks i did it and i do have extra field
it make a button in the registration form.
but the PROBLEM still there - after i press connect and filling the fb form
it is not making new user in drupal - i just can see my fb photo.....

visuaLatte’s picture

StatusFileSize
new172.6 KB

You are on the right page. After enabling the appropriate modules, you should have a screen that looks like the attached picture (note the area inside the red circle). In the "Create Local Account" field, selecting the "If user has authorized the app" option should cause automatic account creation when on the http://example.com/user/register page. I tested this out on my app, and it does successfully send visitors directly to their user-edit screen.

Of course, there are still bugs in this -dev version of the module, and it's possible that something in your configuration is causing a conflict. There is still the unresolved issue of a redirection loop that happens.

syossib’s picture

StatusFileSize
new70.36 KB

i changed my msg.
i found it.
thanks a lot man.
its work well
(ignore the screenshot - i thought ineed to look there but i finally got it)

imoreno’s picture

Hi,
followed all these steps in this thread. i can log via facebook connect but all i can see after authenticating is my picture profile.
it is not being recognized as an authenticated user.

any ideas what can cause this? this will happen only if the app is set as primary. if not, all is working well for me.
Any help will be appreciated.
Itzhak

Dave Cohen’s picture

Assigned: syossib » Unassigned
Status: Active » Fixed

Did you read #6?

imoreno’s picture

Yes i did.
This is not reproducible if the app is not set as primary and everything work as expected. once you set it as primary - the user is not being recognize as authenticated.
Furthermore, even if i assign it a designated role - this role is not being apply, just the picture is loded, no real connection is being initiated.
Any other direction?

Dave Cohen’s picture

I'm guessing you have some other facebook module that is initializing facebook's javascript (without your app ID). Or, some other fatal javascript error that is preventing javascript from running.

Dave Cohen’s picture

Status: Fixed » Active
imoreno’s picture

Hi Dave,
while this might be the case, i was wondering why this will happen only if the app is set as primary? so this conflict will happen only when the app is initialized on all pages? what is different in the initialization of the app when it is primary, this might point me to the solution.

Dave Cohen’s picture

When primary, the facebook PHP sdk and javascript are initialized with that apps ID. When not primary, the ID will be used only on a page that has a block specific to that app (i.e. fb_connect login block).

Most users should make their facebook connect app primary. Not setting primary is for advanced cases where Drupal is hosting multiple apps.

As to why it happens only if app is set to primary, I can't answer that since I don't know why it happens at all. My best guess is #11.

imoreno’s picture

Thanks Dave,
fb_connect login block is on all of my pages.
What would be the best way/tool to try to debug this kind of javascript error? firebug is not catching it.
BR
Itzhak

imoreno’s picture

some debug info:

Permission denied to access property 'className' Line 32

This is the output from firebug using the login button from the fb-devel module.

imoreno’s picture

I need some help with this one, more info:

with firebug debug:

JSON.parse: unexpected non-whitespace character after JSON data Line 13

---------------------------------------------------------------------------------------------------------------------------------------
*/__d("JSON3",[],function(a,b,c,d,e,f){(function(){var g={}.toString,h,i,j,k=e.exports={},l='{"A":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}',m,n,o,p,q,r,s,t,u,v,w,x,y,z,aa,ba=new Date(-3509827334573292),ca,da,ea;try{ba=ba.getUTCFullYear()==-109252&&ba.getUTCMonth()===0&&ba.getUTCDate()==1&&ba.getUTCHours()==10&&ba.getUTCMinutes()==37&&ba.getUTCSeconds()==6&&ba.getUTCMilliseconds()==708;}catch(fa){}if(!ba){ca=Math.floor;da=[0,31,59,90,120,151,181,212,243,273,304,334];ea=function(ga,ha){return da[ha]+365*(ga-1970)+ca((ga-1969+(ha=+(ha>1)))/4)-ca((ga-1901+ha)/100)+ca((ga-1601+ha)/400);};}if(typeof JSON=="object"&&JSON){k.stringify=JSON.stringify;k.parse=JSON.parse;}if((m=typeof k.stringify=="function"&&!ea)){(ba=function(){return 1;}).toJSON=ba;try{m=k.stringify(0)==="0"&&k.stringify(new Number())==="0"&&k.stringify(new String())=='""'&&k.stringify(g)===j&&k.stringify(j)===j&&k.stringify()===j&&k.stringify(ba)==="1"&&k.stringify([ba])=="[1]"&&k.stringify([j])=="[null]"&&k.stringify(null)=="null"&&k.stringify([j,g,null])=="[null,null,null]"&&k.stringify({result:[ba,true,false,null,"\0\b\n\f\r\t"]})==l&&k.stringify(null,ba)==="1"&&k.stringify([1,2],null,1)=="[\n 1,\n 2\n]"&&k.stringify(new Date(-8.64e+15))=='"-271821-04-20T00:00:00.000Z"'&&k.stringify(new Date(8.64e+15))=='"+275760-09-13T00:00:00.000Z"'&&k.stringify(new Date(-62198755200000))=='"-000001-01-01T00:00:00.000Z"'&&k.stringify(new Date(-1))=='"1969-12-31T23:59:59.999Z"';}catch(fa){m=false;}}if(typeof k.parse=="function")try{if(k.parse("0")===0&&!k.parse(false)){ba=k.parse(l);if((r=ba.A.length==5&&ba.A[0]==1)){try{r=!k.parse('"\t"');}catch(fa){}if(r)try{r=k.parse("01")!=1;}catch(fa){}}}}catch(fa){r=false;}ba=l=null;if(!m||!r){if(!(h={}.hasOwnProperty))h=function(ga){var ha={},ia;if((ha.__proto__=null,ha.__proto__={toString:1},ha).toString!=g){h=function(ja){var ka=this.__proto__,la=ja in (this.__proto__=null,this);this.__proto__=ka;return la;};}else{ia=ha.constructor;h=function(ja){var ka=(this.constructor||ia).prototype;return ja in this&&!(ja in ka&&this[ja]===ka[ja]);};}ha=null;return h.call(this,ga);};i=function(ga,ha){var ia=0,ja,ka,la,ma;(ja=function(){this.valueOf=0;}).prototype.valueOf=0;ka=new ja();for(la in ka)if(h.call(ka,la))ia++;ja=ka=null;if(!ia){ka=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];ma=function(na,oa){var pa=g.call(na)=="[object Function]",qa,ra;for(qa in na)if(!(pa&&qa=="prototype")&&h.call(na,qa))oa(qa);for(ra=ka.length;qa=ka[--ra];h.call(na,qa)&&oa(qa));};}else if(ia==2){ma=function(na,oa){var pa={},qa=g.call(na)=="[object Function]",ra;for(ra in na)if(!(qa&&ra=="prototype")&&!h.call(pa,ra)&&(pa[ra]=1)&&h.call(na,ra))oa(ra);};}else ma=function(na,oa){var pa=g.call(na)=="[object Function]",qa,ra;for(qa in na)if(!(pa&&qa=="prototype")&&h.call(na,qa)&&!(ra=qa==="constructor"))oa(qa);if(ra||h.call(na,(qa="constructor")))oa(qa);};return ma(ga,ha);};if(!m){n={"\\":"\\\\",'"':'\\"',"\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"};o=function(ga,ha){return ("000000"+(ha||0)).slice(-ga);};p=function(ga){var ha='"',ia=0,ja;for(;ja=ga.charAt(ia);ia++)ha+='\\"\b\f\n\r\t'.indexOf(ja)>-1?n[ja]:ja<" "?"\\u00"+o(2,ja.charCodeAt(0).toString(16)):ja;return ha+'"';};q=function(ga,ha,ia,ja,ka,la,ma){var na=ha[ga],oa,pa,qa,ra,sa,ta,ua,va,wa,xa,ya,za,ab,bb,cb;if(typeof na=="object"&&na){oa=g.call(na);if(oa=="[object Date]"&&!h.call(na,"toJSON")){if(na>-1/0&&na<1/0){if(ea){ra=ca(na/86400000);for(pa=ca(ra/365.2425)+1970-1;ea(pa+1,0)<=ra;pa++);for(qa=ca((ra-ea(pa,0))/30.42);ea(pa,qa+1)<=ra;qa++);ra=1+ra-ea(pa,qa);sa=(na%86400000+86400000)%86400000;ta=ca(sa/3600000)%24;ua=ca(sa/60000)%60;va=ca(sa/1000)%60;wa=sa%1000;}else{pa=na.getUTCFullYear();qa=na.getUTCMonth();ra=na.getUTCDate();ta=na.getUTCHours();ua=na.getUTCMinutes();va=na.getUTCSeconds();wa=na.getUTCMilliseconds();}na=(pa<=0||pa>=10000?(pa<0?"-":"+")+o(6,pa<0?-pa:pa):o(4,pa))+"-"+o(2,qa+1)+"-"+o(2,ra)+"T"+o(2,ta)+":"+o(2,ua)+":"+o(2,va)+"."+o(3,wa)+"Z";}else na=null;}else if(typeof na.toJSON=="function"&&((oa!="[object Number]"&&oa!="[object String]"&&oa!="[object Array]")||h.call(na,"toJSON")))na=na.toJSON(ga);}if(ia)na=ia.call(ha,ga,na);if(na===null)return "null";oa=g.call(na);if(oa=="[object Boolean]"){return ""+na;}else if(oa=="[object Number]"){return na>-1/0&&na<1/0?""+na:"null";}else if(oa=="[object String]")return p(na);if(typeof na=="object"){for(ab=ma.length;ab--;)if(ma[ab]===na)throw TypeError();ma.push(na);xa=[];bb=la;la+=ka;if(oa=="[object Array]"){for(za=0,ab=na.length;za0)for(ja="",ia>10&&(ia=10);ja.length-1){z++;}else if("{}[]:,".indexOf(ia)>-1){z++;return ia;}else if(ia=='"'){for(ja="@",z++;z-1){ja+=t[ia];z++;}else if(ia=="u"){ka=++z;for(la=z+4;z="0"&&ia<="9"||ia>="a"&&ia<="f"||ia>="A"&&ia<="F"))u();}ja+=s("0x"+ga.slice(ka,z));}else u();}else{if(ia=='"')break;ja+=ia;z++;}}if(ga.charAt(z)=='"'){z++;return ja;}u();}else{ka=z;if(ia=="-"){ma=true;ia=ga.charAt(++z);}if(ia>="0"&&ia<="9"){if(ia=="0"&&(ia=ga.charAt(z+1),ia>="0"&&ia<="9"))u();ma=false;for(;z="0"&&ia<="9");z++);if(ga.charAt(z)=="."){la=++z;for(;la="0"&&ia<="9");la++);if(la==z)u();z=la;}ia=ga.charAt(z);if(ia=="e"||ia=="E"){ia=ga.charAt(++z);if(ia=="+"||ia=="-")z++;for(la=z;la="0"&&ia<="9");la++);if(la==z)u();z=la;}return +ga.slice(ka,z);}if(ma)u();if(ga.slice(z,z+4)=="true"){z+=4;return true;}else if(ga.slice(z,z+5)=="false"){z+=5;return false;}else if(ga.slice(z,z+4)=="null"){z+=4;return null;}u();}}return "$";};w=function(ga){var ha,ia,ja;if(ga=="$")u();if(typeof ga=="string"){if(ga.charAt(0)=="@")return ga.slice(1);if(ga=="["){ha=[];for(;;ia||(ia=true)){ga=v();if(ga=="]")break;if(ia)if(ga==","){ga=v();if(ga=="]")u();}else u();if(ga==",")u();ha.push(w(ga));}return ha;}else if(ga=="{"){ha={};for(;;ia||(ia=true)){ga=v();if(ga=="}")break;if(ia)if(ga==","){ga=v();if(ga=="}")u();}else u();if(ga==","||typeof ga!="string"||ga.charAt(0)!="@"||v()!=":")u();ha[ga.slice(1)]=w(v());}return ha;}u();}return ga;};y=function(ga,ha,ia){var ja=x(ga,ha,ia);if(ja===j){delete ga[ha];}else ga[ha]=ja;};x=function(ga,ha,ia){var ja=ga[ha],ka;if(typeof ja=="object"&&ja)if(g.call(ja)=="[object Array]"){for(ka=ja.length;ka--;)y(ja,ka,ia);}else i(ja,function(la){y(ja,la,ia);});return ia.call(ga,ha,ja);};k.parse=function(ga,ha){z=0;aa=ga;var ia=w(v());if(v()!="$")u();z=aa=null;return ha&&g.call(ha)=="[object Function]"?x((ba={},ba[""]=ia,ba),"",ha):ia;};}}}).call(this);});

---------------------------------------------------------------------------------------------------------------------------------------------
my site is UTF-8, Hebrew, not english, could that be related to the pares error?
if the app is not set as primery, it is working, page is refreshed and user is being created/ connected to the apropiate account.

Also, even when disable ALL modules beside FB, this error acured so i don't think this is a JS conflict issue.

I would appritiate any help as i suspect this is not necessarily drupal for facebook issue.

BR
Itzhak

Dave Cohen’s picture

Not clear to me exactly when the parse error occurs. What line of which js file?

Make sure fb_devel.module is enabled. And configure drupal to not compress javascript or do any caching. See if you can reproduce then.