why social sharing plugin do not work ?

  • 2
  • Problem
  • Updated 4 years ago
gone through tons of link for finding out way to use social share plugin
is it work or some one have just published it without verifying ?

https://github.com/EddyVerbruggen/Soc...
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
  • sad

Posted 4 years ago

  • 2
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
need urgent help .. please help me if some one can
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
The plugin works just fine, it wasn't published without verifying and Eddy, the author, is not just someone.
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
then i dont know what is the problem with it i have visited tones of link related to this but not able to fix the problem
can you please help me ?
i am frustrated with this plugin please please help me
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Well, what is the problem, then? "Doesn't work" means nothing. Be specific.
- doesn't the app get built?
- doesn't the app get installed?
- can't you launch the app?
- does the app crash after launch?
- do you get unexpected results?
- do you receive an error message?
- does your device explode?

And also:
- what PGB version are you using?
- what plugin version are you using?
- on what OS's, OS versions and devices are you testing?
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
thanks for taking interest in it

please go through it i cant tell you what error is exactly in it as when i click on buttons nothing
http://farmtocustomer.com/123.zip

thanks in advance
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
1. You have included
<script src="js/SocialSharing.js"></script>
which you shouldn't, since the plugin will doo that.
See "SocialSharing.js is brought in automatically." in the plugin's documentation

2. You have even included that .js file multiple times in your index.html!

3. You don't have a reference to cordova.js, though.

4. You are not waiting for deviceready to fire before attempting to invoke window.plugins.socialsharing.share(
That method currently throws an error message in your app and that's why nothing is shared.
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
yes i have included it on my index.html
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
but still it is not working i have checked with both adding SocialSharing.js file in .js folder and on removing it from js folder in both cases it don't work
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
I have looked at your zip file again, but see no changes. Did you place a new zip file at the above url?
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
what changes you are expecting ?
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
i am not able to get you ?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Two hours ago, I posted 4 issues, which you should correct.
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
sorry i missed i will upload updated files soon and then will let you know
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@vitkash,
Just a question. Are you aware that Phonegap CLI (build locally) is not needed for Phonegap Build?

Jesse
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@petra v resolved 1 2 3 not sure about 4
http://farmtocustomer.com/123.zip
please check
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@jesseMonroy650 i actually don't know about these things i use notepad++ for writing code and use phonegap v0.2.1 for creating projects and use phonegap developer on my android phone to test please let me know what can be problem http://farmtocustomer.com/123.zip
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
AHHHHH. The root of the problem!!
You cannot use phonegap v0.2.1 (Desktop App/Developer App) with Phonegap Build. Read below.
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
1. You have
<script src="js/SocialSharing.js"></script>
but such file doesn't exist.
Remove the reference.

2. You have about a dozen errors in your html, so your index.html doesn't validate. Especially duplicate values for id attributes make your scripts problematic.
Validate your source and correct the errors.

3. You have a line of inline script:
app.initialize();
However, the object 'app' is not instantiated and the method 'initialize' is not defined. This will throw a javascript error.
In this case, it looks like you have just copied and pasted a code snippet, without adapting it to your needs. What do you want app.initialize(); to do?
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
Canned Message
I need to blog this, so i don't have to repeat this answer again and again.

You cannot use Phonegap Desktop App with Phonegap Build.

Phonegap Desktop App uses Phonegap CLI, so if you want to use Phonegap Desktop App you need to stay with Phonegap CLI.

If you want to use Phonegap Build, then forget what you have done and start over _OR_ make Minor modifications to move Phonegap Desktop App to Phonegap Build. To be clear, the difference is minor, but enough to keep tripping you.

Also, you will not be able to use Phonegap Developer App as that is meant to work with Phonegap Desktop App. You cannot use either CLI or Build with Developer App.

FWIW: I've been trying to get Phonegap to fix this. Here is the report on the issue.

Let me know what you want to do.

Jesse
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Petra,
this getting ridculous. You helped this developers two (2) months ago. And this is no the only developer you 've done this to.

SEE: This
and this

You and jcesarmobile continously ASSume that new developers knows the difference. Then they get stuck in this Phonegap Desktop App B*** Sh*T.
Why don't you ask that simple question -- IF THEY only have one post.
The question is: Are you using Desktop App/Developer App?

YOU DON"T GET POINTS FOR ANSWERING QUESTIONS.

Help the developer. Make the developer a good developer. You have the power to make developers as great as you - if you can get out of this arrogant attitude you keep.

Petra I know you are smart and can answer MANY question better than I can, but putting NEW developers in this trap is beyond me.

Jesse
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
You suggest that developers make "minor modifications".
That's been done in this thread already...so what is it you're bickering about, now? You should be happy to see how these modifications are made.
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
Rather continuing my rant, I am completing the BLOG post I've been promising. You are welcome to make suggestions, and I will include an additional paragraph with your comments - if you like.

Jesse
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
In this case, I have none. The "canned message" is quite clear.
Thanks for blogging.
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
dear i know i dont have much knowledge as you guys have but i want to learn and for that i need your help may be thing i am asking can be silly i am developing an app for grocity buyers app and grocity sellers app and want to add this feature soo need help................
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
I gave you 3 issues to correct (above)
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
i have worked on that and i think every thing is fixed as you suggested
what i have to use instead of phonegap v0.2.1 (Desktop App/Developer App) to test and develop app with social share plugin ?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
To write your code: your favorite code editor
To test: as many different devices as you can get. Optionally also remote debugging (see PGB Docs)
That's all.
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
dear i am using the same and developed this till now
i appreciate if you would find time to review it
https://play.google.com/store/apps/de...

mean while please help me with social share plugin
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@JesseMonroy650(Volunteer) waiting for your blog to solve my problem please share me link of your blog after completion
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
dear i am using the same and developed this till now
i appreciate if you would find time to review it
https://play.google.com/store/apps/de...

mean while please help me with social share plugin
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
What more help do you need?
Did you correct the three issues above?
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
coaded with scrach
http://farmtocustomer.com/1234.zip
please look into it
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Some feedback:

1. You're mostly using old, deprecated plugins from the pgb repo. If you need them at all (I doubt it), replace them by the latest version of the plugins from npm. Be aware that they are named differently. Otherwise remove them.

2. Why did you include icons and splashes for Blackberry? PGB doesn't build for Blackberry.

3. You have specified both landscape and portrait, but the landscape splashes are missing (except one for iPad). Why didn't you include splashes for all sizes, as you did for portrait?

4. You have included:
<plugin version="1" name="cordova-plugin-whitelist"/>
That version of the whitelist plugin doesn't exist. Specify the latest version, or none at all.

5. Why did you include target-densitydpi=device-dpi in your viewport meta-element?

6. You are not waiting for the deviceready event to fire before showing the share buttons. However, you ARE waiting for the deviceready event to fire before showing some message about 'Device is Ready'. I am not quite sure why you don't use that mechanism to enable the buttons after 'deviceready'

It looks like you are copying and pasting code from some default Phonegap app, without having a feeling what each part is doing.
But at least your html is syntactically correct, now.
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
i dont know much about these thing in details

can you please fix this code and let me know what changes fixed the code
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@petra v
please let me know the solution
i have checked my code on fixing on issue you suggested but it is not working at all
correct the code and send me zip
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
i dont know much about these thing in details

can you please fix this code and let me know what changes fixed the code
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@vikash,
my Blog about Desktop App is not about how to make it work. My blog will be why NEW developers should not use it.

On your issue, to work with Phonegap Build you only need two (2) files index.html and config.xml.

What else do you need?
Jesse
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@JesseMonroy650 (Volunteer)
thanx for replying
but things are going confusing
Please clarify
here is source code for hello world app with social share plugin
http://farmtocustomer.com/1234.zip
but it is not working
i have worked on the suggestion of @petra v
but still problem does not get solved
please let me know the solution of it

waiting for fast reply
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@Vikash
Yes. The problem is Desktop App.

DO NOT USE Desktop App and the problems will go away.

Decide on Phonegap Build or Phonegap CLI.

FWIW (For What It is Worth), you code will work with CLI not Build.

As I have already stated:
If you want to use Phonegap Build, then forget what you have done and start over _OR_ make Minor modifications to move Phonegap Desktop App to Phonegap Build. To be clear, the difference is minor, but enough to keep tripping you.


What is happening at this point is the minor differences are tripping you.

Let me know what you want to do.
Jesse
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
Thanks for replying
i actually dont know what is phonegap CLI and what is build

my question may seems silly

but as i stated i am using notepad++ for writing code and testing output by phonegap android app

do i need to build it using build.phonegap.com ?

i directly copied and pasted code from github i dont have done single word modification on code still not working
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@vikash
I apologize for this.

This FAQ should help. Read the bold sentences first.
Top Mistakes by Developers new to Cordova/Phonegap

I'll answer your question after you read the bold sentences.

Jesse
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@jesse thanks for replying
i am confused weather i am using Phonegap or Phonegap Build
as stated on article i am using desktop client and mobile app of phonegap but for building app i am using build.phonegap.com please help me to find out

Still my problem is pending my app is in playstore i have a download target to meet or else investor will break him promise of investment
So i request you to consider this
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@vikash,
okay. You may lose your investor with what I am going to say.

*Phonegap Desktop App* is a teaching and testing app. It is intended to show people how the system works. It is a sandbox environment.

- It is not intended for development.
- It is not intended to produce a final product.
- It requires *Phonegap Developer App*.
- You cannot add more plugins to *Phonegap Developer App*
- You cannot use *Phonegap Desktop App* with *Phonegap Build* without making many changes.

You have a choice. Use Phonegap Build (build.phonegp.com) _OR_ Phonegap CLI. You cannot use *Phonegap Developer App* with either.

Stop using *Phonegap Desktop App*.

Jesse
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@jesse thanks for such a socking news
no issue let investor run i will find some one else
But let say i am using phonegap build then do i need to generate APK for every testing or else there is something like
Phonegap Developer App to solve this problem

I found it very easy till now development using Phonegap Desktop App
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
what about integrating 3rd party plugin ? like this one social sharing plugin
i always find it very difficult when working with 3rd party plugin
Photo of JesseMonroy650 (Volunteer)

JesseMonroy650 (Volunteer), Champion

  • 3325 Posts
  • 122 Reply Likes
@vikash,
There are several emulators available that work with webbrowsers. If you just want to check your HTML layout, you can use your webbrowser in "responsive" (or mobile) mode. Chrome, firefox, MSIE, Safari and others have this.

Phonegap Build has a DEBUG mode (Wienre Emulator) and Hydration (that can change HTML pages like Desktop App). There are many, many solutions for testing the UI (User Interface).

Phonegap CLi has a webbrowser platform, so you can test the mobile device hardware code in a browser. Devices like accelerometer or GPS or contact list, etc.

Does this help?
Jesse
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
cool soo phonegap developer app do not have support for plugins that is why social share was not working right ?

what i need to install to setup on my machine for development of app using Phonegap Build ?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Nothing.
Just use your favorite editor to code away, then zip up your assets and config.
Presto!
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@perta v
did not answer my question

soo phonegap developer app do not have support for plugins that is why social share was not working right ?
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
solved the problem problem was with phonegap developer app or phonegap desktop application
Please suggest me a good emulator for testing purpose so that i do not have to upload zip and download apk
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Uploading a zip and downloading apk will only take a couple of minutes. You better invest those minutes and perform tests on a set of real devices.

You want to test in an environment as close to the real world as possible. Emulators are not equal to your users' live environments!
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@petra v
what should i use for test on real devices as phonegap developer app do not support for plugin ?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
The device! You install the app and test its functions.
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
again for that i need to generate apk and that will take much time so i am asking is there is some other way ?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
How much time does it rake, do you guess?
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
it is inconvenient like first first upload your zip then download apk then install then run to test your app
instead in phonegap developer app you can test things inrealtime
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
Then use Weinre debugging and live with the disadvantages
:-(!
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
thanks for helping @Petra V and @Jesse without you it was difficult to came out from the problem
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
can you please provide me link of any good blog or video tutorial for implementing Google Cloud Messaging in phonegap Build ?
please keep in mind that i have gone to several links for finding a way for GCM but does not find it useful.....
Photo of vikash mishra

vikash mishra

  • 78 Posts
  • 0 Reply Likes
@Petra V thanks for sharing link
gone through it
totally confused like how i can define when push has to go from server ?
how i will be handled on device ?
where and how i can create panel for sending push ?
Photo of Petra V.

Petra V., Champion

  • 7794 Posts
  • 1391 Reply Likes
This is totally beyond PGB topics.
If you don't know how to set up your server and build an application, find a tutorial on the topic, suitable for whatever server and server side language you want to use.
For instance https://www.digitalocean.com/communit...