Options for FB sharing post


#1

Hello guys, i need to know what is the best options to share post via Facebook?

Thanks


#2

http://ngcordova.com/docs/plugins/socialSharing/


#3

That doesnt work for me. I am gettting error. I included ngCordova in modules, and socialsharing.js and ng-cordova.js in index.html. Again i get the error.

TypeError: Cannot read property 'socialsharing' of undefined
    at Object.share

And this is my code in controllers.js.

$scope.shareAnywhere = function() {
        $cordovaSocialSharing.share("This is your message", "This is your subject", "www/imagefile.png", "http://blog.nraboy.com");
    }

#4

This problem will show in your browser.
It will only work on real device.
Do you check it in real device??


#5

Yes and nothing is happening.


#6

ok let me give you a code snipped that I use.

In index.html file

  <!-- cordova script (this will be a 404 during development) -->
<script src="ng-cordova.min.js"></script>
<script src="cordova.js"></script>

ng-cordova will before cordova.js

In app.js file

var app=angular.module('ionicApp', ['ionic','ngCordova'])

In controller.js file

app.controller('SettingCtrl', function($scope,$cordovaSocialSharing) {$scope.shareAnywhere = function() {
				$cordovaSocialSharing.share("Hi I use this App! You can use it. It is just awesome", "motiurion", null, "http://www.motiurion.com/");
		}});

In function($scope,$cordovaSocialSharing) it is must.

Check by matching this with yours.


#7

If still get error then please remove the plugin by

cordova plugin remove SocialSharing-PhoneGap-Plugin

then reinstall it by

cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git

and check.


#8

I did that and again nothing. I think that plugin isnt compatible with newest versions of iOS and android.