Share Plugin Configuration - Adding a social network


Add the share interface to the player.

Adding a social network

You can add social networks to the Share plugin by adding it to the "config" Flashvar object and listing it in the "socialNetworks" Flashvar:
In the example below, the Pinterest social network was added to the Share plugin:


Sample code for Share configuration:
  1. kWidget.featureConfig({
  2. 'targetId': 'kdp',
  3. 'wid': '_243342',
  4. 'uiconf_id' : '21099702',
  5. 'entry_id' : '1_sf5ovm7u',
  6. 'readyCallback': onReadyCallback,
  7. 'flashvars': {
  8. 'share': {
  9. 'plugin': true,
  10. 'parent': "topBarContainer",
  11. 'order': 3,
  12. 'socialShareURL': 'smart',
  13. 'socialNetworks': 'facebook,pinterest,twitter,googleplus,linkedin',
  14. 'shareConfig': {
  15. "facebook": {
  16. "name": "Facebook",
  17. "icon": "",
  18. "cssClass": "icon-share-facebook",
  19. "template": "https://www.facebook.com/sharer/sharer.php?u={share.shareURL}",
  20. "redirectUrl": 'fb://feed/'
  21. },
  22. "pinterest": {
  23. "name": "Pinterest",
  24. "icon": "http://projects.kaltura.com/amir/pinterest_blue36x36.png",
  25. "cssClass": "",
  26. "template": "http://pinterest.com/pin/create/button/?url={share.shareURL}&media={mediaProxy.entry.thumbnailUrl}/width/400&description={mediaProxy.entry.description}",
  27. "redirectUrl": ''
  28. },
  29. "twitter": {
  30. "name": "Twitter",
  31. "icon": "",
  32. "cssClass": "icon-share-twitter",
  33. "template": "https://twitter.com/share?url={share.shareURL}",
  34. "redirectUrl": 'https://twitter.com/intent/tweet/complete?,https://twitter.com/intent/tweet/update'
  35. },
  36. "googleplus": {
  37. "name": "Google+",
  38. "icon": "",
  39. "cssClass": "icon-share-google",
  40. "template": "https://plus.google.com/share?url={share.shareURL}",
  41. "redirectUrl": 'https://plus.google.com/app/basic/stream'
  42. },
  43. "email": {
  44. "name": "Mail",
  45. "icon": "",
  46. "cssClass": "icon-share-email",
  47. "template": "mailto:?subject=Check out {mediaProxy.entry.name}&body=Check out {mediaProxy.entry.name}: {share.shareURL}",
  48. "redirectUrl": ''
  49. },
  50. "linkedin": {
  51. "name": "LinkedIn",
  52. "icon": "",
  53. "cssClass": "icon-share-linkedin",
  54. "template": "http://www.linkedin.com/shareArticle?mini=true&url={share.shareURL}",
  55. "redirectUrl": ''
  56. }
  57. }
  58. },
  59. 'topBarContainer.plugin': true
  60. }
  61. });
  62. });
  63.  
html5 qunit | flash qunit