Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9158215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:11:46+00:00 2026-06-17T13:11:46+00:00

I am trying to use the PhoneGap Share plugin for 2.0 version. I have

  • 0

I am trying to use the PhoneGap Share plugin for 2.0 version. I have implemented it but this is not work properly.

This plugin is written in PhoneGap 1.0 and later version any new or updated plugin for share message on Facebook.

I’ve referred to this documentation and this question: How to implement facebook send, twitter share, send sms, send email in my phonegap android application?

But still not getting proper solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:11:47+00:00Added an answer on June 17, 2026 at 1:11 pm

    I am sharing my code which is working fine.
    Please refer This link for share plugin functionality and follow below given steps.

    1- Place the JS file in the same folder of the MainActivity.java folder.

    2- Place the Js file in the www folder and add it to the index.html folder.

    3- Add the following line to the config.xml (if you are using new version of Phonegap) or plugins.xml (for old version of Phonegap):

    4 – add html

        <!DOCTYPE html>
        <html>
        <head>
        <script type="text/javascript" src="js/libs/cordova-2.0.0.js"></script>
        <script type="text/javascript" src="js/libs/jq_min.js"></script>
        <script src="js/libs/share.js">
        </script>
        <script>
            // Wait for Cordova to load
            //
            document.addEventListener("deviceready", onDeviceReady, false);
    
            // Cordova is ready
            //
            function onDeviceReady() {
    
            }
    
            //share plugin for update status  
            function share(subject, text) { 
            window.plugins.share.show({
            subject: subject,
            text: text},
            function() {
            alert("sent success");}, // Success function
            function() {alert('Share failed')} // Failure function
             );
            };
    
            //Send message on facebook
            $(document).ready(function() {
            $("button#sendFacebook").click(function(){
            var txtsub = $("input#txtsub").attr("value");
            var txtmsg = $("#txtmsg").val();
            share(txtsub, txtmsg);
        });
    
        });
        </script>
        </head>
    
        <body>
        <input id="txtsub" type="text" placeholder="Enter Subject" maxlength="20" required /><br/><br/>
    
        <textarea placeholder="Enter Message" id="txtmsg" rows="4" cols="25"></textarea><br/>
        <button id="sendFacebook">Update Status </button>
    
    
        </body>
        </html>
    

    and test this plugin for Face book,twitter,gmail etc.
    & enjoy :).

    Let me know if you have any query.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use this widget ( https://github.com/johannilsson/android-pulltorefresh ) in a phonegap project, but
I'm trying to use a Phonegap plugin and am having trouble. This is my
I'm trying to use iOS PhoneGap Screenshot plugin on PhoneGap 2.1. This is my
I'm trying to use a prepopulated DB with PhoneGap, so I'm trying THIS plugin
I am trying to use the BarcodeScanner plugin (from ) with PhoneGap. I have
I am trying to use the PhoneGap Share plugin which is supposed to bring
I'm trying to use PhoneGap DatePicker plugin (PhoneGap 1.5 (Cordova) in Xcode 4.2) for
I am currently trying to use the PhoneGap LocalNotification Plugin , using Android 4.1
I'm trying to use the barcode scanner plugin for PhoneGap . I've followed the
I'm learning PhoneGap and I tried to use the Notification Local Plugin , but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.