How can we implement the addition to anyone (Social networks) in MobileFirst

How can we implement Add to any social network widget to share photos on facebook, twitter, etc. on the Mobilefirst platform. I tried the plugin from http://www.addthis.com/ It works on previewing in shared resources, but does not work on simulators and Android and Windows 8 devices.

Can anyone suggest any other plugin for the MobileFirst platform? I tried jquery also with the following code, but it didn’t work.

$('#mydiv').share({
        networks: ['facebook','pinterest','googleplus','twitter','linkedin','tumblr','in1','email','stumbleupon','digg']
    });

 <div id="mydiv"></div>
+4
source share
1 answer

: . : https://developer.ibm.com/mobilefirstplatform/2015/08/03/integrating-3rd-party-cordova-plug-ins/

"" IMO.
Google .

Android, iOS Windows Phone PhoneGap.

.. CLI Cordova Worklight/MobileFirst. .

, MFP Cordova, , MFP.


iOS .

:

  • 2 Android Windows Phone 8, .
  • 2 MobileFirst Studio, .

:

  • :
    • MessageUI.framework
    • Social.framework

  • ( Xcode) www\worklight\cordova_plugins.js

     {
         "file": "../js/SocialSharing.js",
         "id": "nl.x-services.plugins.socialsharing",
         "clobbers": [
             "window.plugins.socialsharing"
         ]
     }
    

    . SocialSharing.js \js, HEAD index.html

  • SocialSharing.js,

    cordova.define("nl.x-services.plugins.socialsharing", function(require, exports, module) {
        // file contents
    ); 
    
  • HTML , (. ).

:

enter image description here

+5

Source: https://habr.com/ru/post/1568298/


All Articles