-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 117 - Update facebook javascript #121
base: master
Are you sure you want to change the base?
Conversation
9512357
to
48d531a
Compare
var js, fjs = d.getElementsByTagName(s)[0]; | ||
if (d.getElementById(id)) return; | ||
js = d.createElement(s); js.id = id; | ||
js.src = "//connect.facebook.net/{0}/sdk.js#xfbml=1&version=v2.10"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example from Facebook API is broken, it miss the &version
part and then asks for the version at first run (I think it is related with locale change this error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check the code produced by the widget, not the one in the example.
@@ -16,5 +16,5 @@ | |||
</tal:image> | |||
<meta tal:condition="view/admins" property="fb:admins" tal:attributes="content view/admins" /> | |||
<meta tal:condition="view/app_id" property="fb:app_id" tal:attributes="content view/app_id" /> | |||
<script type="application/javascript" tal:content="view/fbjs"></script> | |||
<script type="application/javascript" tal:content="structure view/fbjs"></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use structure to produce the &
|
||
self.document.setLanguage('en') | ||
view = document.restrictedTraverse(plugin_view) | ||
html = view.metadata() | ||
self.assertIn('connect.facebook.net/en_GB/all.js', html) | ||
self.assertIn('connect.facebook.net/en_GB/sdk.js', html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't it supposed to be en_US
here? I think we have a Bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea; you have to dig further on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code that produces the language is not a simple one. I'll use this issue to check it out #122
CHANGES.rst
Outdated
@@ -6,6 +6,9 @@ There's a frood who really knows where his towel is. | |||
2.10.1 (unreleased) | |||
^^^^^^^^^^^^^^^^^^^ | |||
|
|||
- Update plugins javascript (closes `#117 <https://github.com/collective/sc.social.like/issues/117>`_). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not closing the issue; the issue serves only as a reference; the changelog entry must be something like: Facebook's widget code was updated… blah, blah, blah.
we'll take care of that later.
ee60716
to
4634ba5
Compare
WIP
Documentation: https://developers.facebook.com/docs/plugins/share-button
Todo list:
Do not track
option activated.- The answer is
Yes
. It is a bad behavior for mobile to open a new tab. Of course they prefer if you use the native share option from mobile, but what if you didn't install the facebook app in your phone? you just can't share the page, and this option fix the behavior to don't jump to the new tab.