Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

upuxaa/cordova-plugin-social-embeds

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Social Embed Plugin

This plugin will call javascript function defined in your app when user click on any iFrame links. Will solve the issues of instagram and twitter embeds if used properly.

version

0.0.1

Using

Install the plugin

$ cordova plugin add cordova-plugin-inappbrowser
$ cordova plugin add https://github.com/arielgelbard/cordova-plugin-social-embeds.git

Edit index.html and add the following code

    <script>
        window.openLinkInAppBrowser = function (url) {
               console.log('Linked click  - ', url);
               window.open(url, '_blank');
        }
    </script>

Use following code in your component where loading embeds

    declare const SocialEmbeds; // In case you are getting typescript errorMessage
    // Enable plugin
    SocialEmbeds.updatePluginToWhitelist('url1,ur2,url3,...', function(success){}, function(failure){});
    // Disable plugin
    SocialEmbeds.updatePluginToWhitelist('', function(success){}, function(failure){});

About

Sample Hello World Cordova Plugin

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Objective-C 51.3%
  • Java 41.6%
  • JavaScript 7.1%