angularjssocialshare

Sharing a link in facebook


I am sharing a link http://35.154.102.35/index.html#/shareProfilein facebook. But sharing doesnt happen , it take shareProfile as userid and redirect to profile of person share.profile.What can be done to redirect to my link ?

HtmL:

 <div class="share-links">
      <a href="http://facebook.com/sharer.php?u={{shareVDetails}}" class="fa fa-facebook" target="_blank"></a>
    </div>

JS:

$scope.shareVDetails = "http://35.154.102.35/index.html#/shareProfile";

Solution

  • try this

    $scope.shareVDetails = "http://35.154.102.35/index.html#/shareProfile";
    
    $scope.facebook = "http://facebook.com/sharer.php?u=" + $scope.shareVDetails;
    

    on html

    <a href="{{ facebook }}" >