FBJS publish stream not working in google chrome

Tag: facebook Author: hdiell Date: 2009-08-17

I have created an application in facebook,all is working fine except the "publish" to profile method of FBJS

I am using it like this. first post a topic and ask the user if he wants to publish it or not.

The code is working fine in firefox and internet explorer but it is not woking in google chrome browser. The extended permission dialog box is not appearing in the google chrome browser.

Here is the code that I am using.

FB_RequireFeatures(["XFBML", "Api", "CanvasUtil"], function() { FB.Facebook.init('c61665f45b9ae5e7db667fcb4b6e0f38','crossdomain/xd_receiver.html');

var attachment={'name':'i\'m bursting with joy','href':'http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/','description':'a funny looking cat','caption':'{actor} rated the lolcat 5 stars','media':[{'type':'image','src':'http://bit.ly/AJTnf','href':'http://bit.ly/hifZk'}]};

var actionLinks = [{ "text": "Visit Site", "href": "http://www.askme.im"}];

FB.Connect.showPermissionDialog("publish_stream", function(x){FB.Connect.streamPublish('hello this is a test post', attachment,actionLinks,null,null,null,true);}, true); });

I have included the featureloader file also, but the dialog box doesn't appear at all in google chrome browser.

Can anybody help me if I am doing something wrong. I am really stuck.

thanks

Best Answer

:-)

Found the answer :-) (more than happy to do it)., Posting it here so that anybody may not waste his time looking for answer.

Just make sure that you use all the necessary html tags in your file in which you are using FBJS.

In my case I was missing the head tag, and then I included the FB.Connect code in "head" tag and bingo.. It worked like a charm.

Found the same problem on this link on facebook developer forum and followed the solution that Mr. pschmid0 did i.e. included the FB.Connect code in "head" tag and it (FBJS show permission dialog) worked in chrome also.