Share Facebook

2

The documentation for facebook is a bit flawed. What parameters should I pass to share a product and your photo on facebook coming from a website?

I create the page path:

$url = $base_url."index.php/{$controller}/".join('/',$parametros);

And I put it as a date-href as the API says:

<div class="fb-share-button" data-href="<?php echo $url ?>" data-layout="button_count"></div>
    
asked by anonymous 25.03.2015 / 18:01

2 answers

3

You need to include the meta tag below in your html for the image to be detected on the share.

<meta property="og:image" content="LINK_DA_IMAGEM"/>

For more information on meta tags , visit link and put < in> link of your page. You will see other possible meta tags that are missing from your page.

    
25.03.2015 / 19:10
-2

Link properties are not specified in the button. In case you would have to use Js dialog ui.feed which will be able to specify the sharing information explicitly, but the ideal is neither uifeed nor share button, just implement a like .. Like button .. And put properties to be recommend (not a product ??) and enable sharing. Both will appear. Now about the image you will have to implement the open graph.

With open graph shares through the link, it is owned by a URL, if the comrade has a page of a product that is what he has to do even. But he will have to implement the full stretch. If it is an application it can do a posting dialog, in the case, fb.ui or fb.feed do not know.There used to specify image title and sub description of a post. It can direct to the app, and can load a variable, it could also put an action button in the done post, and that button would return the variable. Today the link must have details and it will be a rich product type object. learn only the documentation

    
12.09.2018 / 09:18