Home Sharing Different Image and Content on facebook through same page
Reply: 2

Sharing Different Image and Content on facebook through same page

Rishi Kalal
1#
Rishi Kalal Published in 2018-01-11 11:11:52Z

How to share some content with Images on the facebook. The sharing conent should look like as the given reference image

I'm generating dynamic content with share button to share on facebook through the same page. I have searched a lot of things on internet but didnt found anything helpful yet.

I have tried the following code but this is deprecated from facebook show do not works fine

$('#share_button').click(function(e){
        e.preventDefault(); 
        FB.ui(
        {
            method: 'feed',
           link: "https://example.com/some_path",
            picture: "https://example.com/image/path",
            caption: "Some caption here",
            description: 'put some description here',

        });     
    });
dipmala
2#
dipmala Reply to 2018-01-11 12:25:21Z

You can achieve using following link just add link like this.

`<a href="http://www.facebook.com/share.php?u=[URL]&title=[TITLE]&picture=[IMAGE]">FB Share</a>`   

URL = Url which you want to share
TITLE = Title which you ant to share
IMAGE = Image whole path which you want to share dynamically.

This is works for me so i hope its helpful for you as well.

Rishi Kalal
3#
Rishi Kalal Reply to 2018-01-11 13:15:59Z

This helped me.

FB.ui({
        method: 'share_open_graph',
        action_type: 'og.shares',
        action_properties: JSON.stringify({
            object: {
                'og:url': urlpath ,
                'og:title': some_title,
                'og:description': some_description,
                'og:image': imagepath ,

            }
        })
    },
 function (response) {
//your code goes here
 });
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.319535 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO