As a spin-off from this recently fixed issue (https://www.drupal.org/node/2478609) i would like to open a Drupal thread to deal with an apparently still present side-effect FB connecting apps (like simple_fb_connect) are confronted with, once successfully logged in :
http://stackoverflow.com/questions/7131909/facebook-callback-appends-to-...
The added hashes are creating Jquery malfunctions in my current project, described in this comment :
https://www.drupal.org/node/2478609#comment-10615394

I've tried to implement 2 methods presented in this stackoverflow thread, by adding reached out javascript sample on $(window).load() event :
clean-hashes-script-js.JPG

The events are picked up but somehow executed too late.
As adviced by the stackoverflow thread, i tried to find a solution adding the above piece of JS inside the HEAD tag, but couldn't find a suitable drupal function to add it there.
drupal_add_js() only reaches high enough until tab, but not .
In drupal 6 there's an equivalent function drupal_set_html_head() allowing to inject JS directly into the section.
Example :
http://drupal.stackexchange.com/questions/6592/how-to-add-script-to-head

How does D7 supports this, without considering the alternative of directly injecting the JS inside page.tpl.php, but from within a custom php hook module (preprocess_html or _page) ?

Thanks for contributing in this.

CommentFileSizeAuthor
clean-hashes-script-js.JPG81.18 KBRAWDESK
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RAWDESK created an issue. See original summary.

masipila’s picture

Status: Active » Closed (works as designed)

Found this Facebook bug report about this #_=_ topic
https://developers.facebook.com/bugs/318390728250352/

According to Facebook, this suffix is added by design in order to avoid a possible security issue where the Facebook session could be hijacked if there would be a redirect to another site.

If you don't like the #_=_ characters (or they interfere jqueries like you mentioned) you should remove them on client side using window.location.hash as recommended on the Facebook issue.

Since this is by design by Facebook for security reasons, I will not commit any server side tweaks that would remove this safety mechanism.

Markus
module maintainer