facebook on authorization the dialogue goes to channel.html?fb_xd_fragment problem

Facebook No Comments »

I was writing a facebook application.

I had a form when the submit button is clicked i show the authorization dialogue.

What happened was when the user either clicked cancel or accept the dialogue redirected to channel.html instead of closing itself.

This happened in Internet Explorer.

On other browsers when i pressed the cancel button it redirects to http://facebook.com/home.php (i think it is a problem with facebook)

After doing trial and errors i found that i had a non https url also when ever i loaded the page it showed the insecure content alert in internet explorer.

After fixing the urls to https making sure that no url is http in my site that insecure content alert did not appear and i did not get the channel.html

so after fixing the insecure content problem and after authorization of facebook the dialogue closed properly as expected.

so if you guys are struck with this then try to change no https url’s to https and the dialogue works fine.

Besides, if you want another work around which is not completely verified way… here we go…

in the channel.html use javascript code to parse the url.

find where the request has come from and according to that use window.close

for example when i clicked cancel i had the content in the url saying “user cancelled” (this is not the exact word i got but i am just giving an example)

so i can parse to find that word and can close the dialouge according to it.

Like this you can check the url and find a text which appears when ever you cancel or authorize and use it to condition to close the dialouge window.

:)

facebook comments set 100% percent width for facebook comments

Facebook 1 Comment »

I wanted to set percentage width for facebook comments plugin.

I searched the web and i got the following information from stackoverflow.

What i previously had was the following

<div id="fb-root"></div>
<div class="fb-comments" data-href="http://vikku.info/programming/" data-num-posts="100" data-width="500"></div>
</div>

I was trying to set data-num-posts=’100%’ which was not working. and then change the above to the following

<div id="fb-root"></div>
<div class="fb-comments" data-href="http://vikku.info/programming/" data-num-posts="100" data-width="500" width="100%" style="width: 100%;"></div>
</div>

and then added the following style in the style section

/* for facebook width 100% */
iframe.fb_ltr { width:90% !important; }

That’s it. It is working. …

oh… after a few days of working with the above i added a like button. the above style affected the like button and i was wondering how to change the width to 100% without affecting the like button.
Then got this from stackoverflow. So i placed only the following and removed the styles specified above.

remove width=”100%” style=”width: 100%;” from <fb:comments tag and add only the following in the style. voila it works.

.fb-comments, .fb-comments iframe[style] {width: 100% !important;}

the above was used from this url http://stackoverflow.com/questions/7447483/how-to-make-facebook-comments-widget-a-fluid-width

References

http://stackoverflow.com/questions/5305685/facebook-comments-plugin

http://stackoverflow.com/questions/7447483/how-to-make-facebook-comments-widget-a-fluid-width

Entries RSS