Problem social-sharing ionic v 3

I get error when i use social-sharing on ionic3
this error :
error

my .html : <button ion-button full (click)=“shareTwitter()”>share

.ts : async shareTwitter() {
// Either URL or Image
this.socialSharing.shareViaTwitter(null, null, this.url).then(() => {

}).catch((e) => {
 
});

}

this my plugins

cordova plugin ls
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-file 6.0.1 “File”
cordova-plugin-ionic-keyboard 2.1.3 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 2.2.5 “cordova-plugin-ionic-webview”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-plugin-x-socialsharing 5.4.3 “SocialSharing”
es6-promise-plugin 4.2.2 “Promise”

my ionic info
Ionic:

ionic (Ionic CLI) : 4.5.0 (C:\Users\ACER\AppData\Roaming\npm\node_modules\io
nic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-i
onic-webview 2.2.5, (and 6 other plugins)

System:

NodeJS : v10.14.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 8.1

thankss

Hello,

Try this:

twitterShare() {
this.socialSharing.shareViaTwitter("Text ", “Image”, “URL”).then(() => {
console.log(“shareViaTwitter: Success”);
}).catch(() => {
console.error(“shareViaTwitter: failed”);
});
}

thanks… i have fixed this issues…

2 Likes

what is your solution? help!

my cordova is not installed yesterday…

I have problems Whit social-sharing i don’t hace use because not declarated as provider :sleepy:

hei check this :
must have ngx in folder social-sharing
image


TypeError: Object(…) is not a function
at SocialSharing.canShareViaEmail
declared in mi app.module.ts
import {SocialSharing} from ‘@ionic-native/social-sharing/ngx’;
providers[
SocialSharing
]

hei friend at import dont use ‘ngx’ i just want you to chect thats folder
and for ionic v 3 use “cordova-plugin-x-socialsharing”: “4.x.x”,

1 Like

Thanks I fixed my issues , sorry for my english is very bad :wink:

dont exist version 4 on npm :confused:

I got the same problem but not fixing the problem. Any one can help me if possible

ionic-error-2

My IONIC info as

Ionic:

Ionic CLI : 5.4.2 (C:\apps\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 7 other plugins)

Utility:

cordova-res : 0.8.1
native-run : 0.3.0

System:

NodeJS : v10.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.13.1
OS : Windows 10

Installed plugins are

ionic-error-3

Hey there. I am about to implement this plugin into my app, which is tested on iOS device right now.
But whenever I tap the Share Via Instagram button, the prompt will popup, but I cant see the instagram app in there and also in xCode here is some errors from the log:

LPFileMetadataProviderSpecialization failed to retrieve a thumbnail from QuickLookThumbnailing (Error Domain=QLThumbnailErrorDomain Code=0 "Could not generate a thumbnail")
...
[ShareSheet] connection invalidated
...
SLRemoteComposeViewController: (this may be harmless) viewServiceDidTerminateWithError: Error Domain=_UIViewServiceErrorDomain Code=1 "(null)" UserInfo={Terminated=disconnect method}

DId you faced with this kind of problem, after you ran the app on device? I don’t really understand why is not working…I also tried the instagram plugin, which has fewer options, but it also should work. But Whenever I take a picture, and it calls the shareViaInstagram I can’t see the Instagram app, or it won’t do anything, only those errors, which i pasted.

I hope someone has some tips for me, thanks!