Parth Sureliya
Parth Sureliya

Reputation: 256

How to share image in angular js social share in facebook

I need to share the image in Angular js social share for Facebook. But it doesn't show the image in sharing. Here is my Code.

<button class="btn btn-info"
    socialshare
    socialshare-provider="facebook"
    socialshare-type="feed"
    socialshare-via="MY KEY"
    socialshare-quote="Thiscountz quote"
    socialshare-display="page"
    socialshare-quote="Thiscountz quote"
    socialshare-url="thiscountz.com" 
    socialshare-media="https://static.ipictheaters.com/2011102503/cache/Content/images/marketing/herocrop.jpg">

    <span class="fa fa-facebook "></span>

</button>

Upvotes: 0

Views: 3488

Answers (1)

The.Bear
The.Bear

Reputation: 5855

You are setting the images url to social-media and you should use socialshare-url for facebook. If you read the docs, you will see that social-media is not part of facebook share directives/options.

<button type="button" class="btn btn-info"
    socialshare
    socialshare-provider="facebook"
    socialshare-type="feed"
    socialshare-via="MY KEY"
    socialshare-quote="Thiscountz quote"
    socialshare-display="page"
    socialshare-url="https://static.ipictheaters.com/2011102503/cache/Content/images/marketing/herocrop.jpg" >

    <span class="fa fa-facebook "></span>

</button>

Also, I've noted that you are setting the socialshare-quote option twice, and you didn't add a type="button" to the button (Maybe this isn't related with your real problem, but you can add the button type as a good practice)

Upvotes: 1

Related Questions