Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
1.5k views
in Plugins by
edited by

I get a javscript error:


Error: this.event is undefined
Source File: http://static.ak.fbcdn.net/rsrc.php/v1/ye/r/jS77DnMhcP9.js
Line: 31

How comes? Is the iframe not working?

code from html:

<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.gute-mathe-fragen.de/561/gleichseitiges-dreieck-seiten-flacheninhaltes-berechnen&amp;send=false&amp;layout=standard&amp;width=450&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20&amp;appId=170382616390886" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:20px;" allowTransparency="true"></iframe>

Question is related to: http://www.question2answer.org/qa/14204/share-plugin-problem-button-works-except-facebook-like-button

 

 

PS: Reading here at addthis that others have problems as well, so it might be that Facebook changed something in their code (i'm not surprised)...

Edit 1: I deactivated the facebook login plugin, but the error still persists. So this is not causing the problem.

Edit 2: Found a discussion about this on stackoverflow. We have to wait for Facebook.

by
Does ti work now?
by
Never used facebook + the plugin again :)
by
Does not help :D I want to use it, to build up the traffic :) I'm asking, before I try to develop my own solution...

1 Answer

0 votes
by

In the plugin, qa-share-layer.php at line 76 you have to change the code from:

                'facebook'=> '<iframe src="//www.facebook.com/plugins/like.php?href='.qa_path_html(qa_q_request($this->content['q_view']['raw']['postid'], $this->content['q_view']['raw']['title']), null, qa_opt('site_url')).'&amp;send=false&amp;layout=standard&amp;width=53&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20&amp;appId=170382616390886" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:53px; height:20px;" allowTransparency="true"></iframe>',
 

to:

                'facebook'=> '<iframe src="//www.facebook.com/plugins/like.php?href='.qa_path_html(qa_q_request($this->content['q_view']['raw']['postid'], $this->content['q_view']['raw']['title']), null, qa_opt('site_url')).'&amp;send=false&amp;width=53&amp;layout=button_count&amp;show_faces=false&amp;action=like&amp;colorscheme=light&amp;font&amp;height=20" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:53px; height:20px;" allowTransparency="true"></iframe>',
 

The layout parameter was given twice and possibly causing the problem. So remove "&amp;layout=standard". (And appid in the end, is no valid parameter as far as I could find out).
@Noah: Maybe you can update this at github?

 

Edit: D+mn, again not working. I think we have to wait for facebook as mentioned in the stackoverflow link...

by
The problem may be in the point, that the fb-plugin loads the java script sdk with xfmbl parameter set to true.

May be that interfers with the iframe version.

See the http://developers.facebook.com/tools/debug
fb linter as well.
by
now it is working again (case: not logged in, clicking like, opening a login box): http://www.gute-mathe-fragen.de/561/gleichseitiges-dreieck-seiten-flacheninhaltes-berechnen

facebook should really get better developers ;) or just a good transparent competitor so that we all can swap (but that's another story).
by
Did this get fixed? OR is there a solution? I seem to be still getting the error
...