AppShare Setup

AppShare allows you to use a native share sheet in your app, that allows sharing via Twitter, Facebook, Email, SMS, and a variety of other platforms.

Important: The AppShare extension only works on WordPress pages, not custom pages or API lists

Installing the AppShare extension.

  1. Upload the plugin .zip file to your WordPress site under Plugins => Add New => Upload.
  2. You will now find a new "AppShare" tab in your AppPresser settings. Please visit there to configure the available extension settings.

Configuring AppShare.

The AppShare extension offers a handful of settings to help you configure its behavior. Below we will discuss each in greater detail.

  1. AppShare License Key
    • Add your license key to receive critical updates
  2. Add Share Button after post content?
    • Enabling this setting will add a "Share this" html button at the end of all of your posts and allow your users to share with a list of available social networks. Important: this only applies to WordPress pages, not custom pages or API lists.
  3. Add Share Button after post excerpt?
    • This acts just like the setting for "Add Share Button after post content" except this is for adding the button after the shorter "excerpt" version of post content. Important: this only applies to WordPress pages, not custom pages or API lists.
  4. Button Text. (Default text: Share This)
    • Text to use as the text for the generated button.  *This text does not show on phones, only on larger screens.
  5. Button class for custom styles
    • custom html class attributes to be added to the output for css purposes.

Once you are happy with the settings, click the "Save Settings" button.

appshareButton()

If you want to add the sharing button in custom places within your theme, you can use theappshareButton() php function. It has one argument, which is a string that needs to be constructed the same you would the shortcode in your post editor, and takes all of the same parameters. See the shortcode attribute reference below. The string gets passed into a complete shortcode that is used with do_shortcode

Example:

appshareButton( 'class="custom_class" button_text="Share me!"' );

Scripts and styles

Handle file path (relative) dependencies Output Location
socialshare /js/SocialSharing.js cordova-core, jquery footer

[appshare] shortcode

Example:[appshare button_text="Share me!"]
Attribute type Details Available parameters
class string Specifies what class or classes to add to the html button as many space-separated words as you need. 
Default: none
message string What to use as the message text Whatever you want 
Default: the post title
link string What link to use with the message Whatever you want 
Default: the post shortlink
button_text string What the html button should say Whatever you want 
Default: "Share This"

AppShare Hooks

active_plugins

Type: Filter | File: appshare.php | Since: 1.0.0

Allows you to intercept get_option( 'active_plugins' ) before our extension determines if the required plugins are presently active.

Default value:

get_option( 'active_plugins' ) //Saved value from your WP install. Not specific to AppPresser

appshare_btn

Type: Filter | File: inc/filters.php | Since: 1.2.1

Allows you to obtain or intercept the preferences of the admin settings for dispaying the share button.

Sample use:

// Don't output the share button 
add_filter( 'appshare_btn', '__return_false', 999 );