Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Facebook sdk v2.0

  • Felipe
  • Felipe's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 6 months ago #138574 by Felipe
Facebook sdk v2.0 was created by Felipe
I included the JavaScript SDK version 2.0 code on Kiji template parameters, right after the opening <body> tag, but its not working.
Adding Facebook app ID on template parameters doesn't work (no like box module on frontpage, not in spanish on other pages).
The code version 1.0 works.

Regards

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 6 months ago - 10 years 6 months ago #138575 by Krikor Boghossian
Replied by Krikor Boghossian on topic Facebook sdk v2.0
I viewed your site's source.

In the index I could not see the FB JS code.
It might be working in the inner pages because K2 is using it inside items.

The optimal solution would be to insert that snippet in your index.php file and then remove the instance from item.php (templates/kiji/html/com_k2/default/item.php).

As for changing the language you need to read the API documentation at: developers.facebook.com/docs/plugins/like-button/
(How do I display the Like button in different languages?).
The same should apply to all fb widgets.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Felipe
  • Felipe's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 6 months ago - 10 years 6 months ago #138576 by Felipe
Replied by Felipe on topic Facebook sdk v2.0
I'm sorry Krikor, you can take a look now. (I was trying different configs for my Facebook module and then the battery of my computer run out). Now the sdk code it is again included in Kiji's template parameters.

In any case, the code pasted is:

Part of the message is hidden for the guests. Please log in or register to see it.


Regards,

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 6 months ago #138577 by Krikor Boghossian
Replied by Krikor Boghossian on topic Facebook sdk v2.0
Bad news Felipe,

It appears to be an issue on FB's side.
stackoverflow.com/questions/14915152/loading-iframe-facebook-load-denied-by-x-frame-options

You can always double check your meta tags (the app info) or experiment with removing params from
//connect.facebook.net/es_LA/sdk.js#xfbml=1&appId=642517725785441

eg: //connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.0
or //connect.facebook.net/es_LA/sdk.js#xfbml=1 or finally try the iframe solution.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Felipe
  • Felipe's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 6 months ago - 10 years 6 months ago #138578 by Felipe
Replied by Felipe on topic Facebook sdk v2.0
Thanks again Krikor for your support.
As I need the Fb like box module to appear also on the frontpage, I must include the code on template parameters. (It is working again when removed appid, version and js file name from the code).
I like your optimal solution which consider removing the instance from com_k2 item.php. Can I just comment out the Fb code on that file?
<div id="fb-root"></div>
<script type="text/javascript">
(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/es_LA/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 6 months ago #138579 by Krikor Boghossian
Replied by Krikor Boghossian on topic Facebook sdk v2.0
Sure,

since you already include it you have to do this.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum