简体   繁体   中英

I need to share multiple images using facebook

In my website there is shopping cart. if shopping cart contain 4 products then 4 images will be share on facebook at once.

right now am using the below code but its not working properly

<?php 
$facebook = "http://www.facebook.com/sharer.php?u=http://server.ashoresystems.com/~crookedt/index.php?option=com_easydiscuss&view=post";
?>

below url is a screenshot of the page.

please help me to solve this problem.

在此处输入图片说明

Here is my Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">  
<?php
                    $title=urlencode('Title of Your iFrame Tab');
                    //$url=urlencode('http://www.facebook.com/yourfanpage');
                    $url=urlencode('http://www.kokopame.com');
                    $summary=urlencode('Custom message that summarizes what your tab is about, or just a simple message to tell people to check out your tab.');

                ?>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Kokopame</title>
        <meta property="og:title" content="Title of Your iFrame Tab"/>
        <meta property="og:description" content="Custom message that summarizes what your tab is about, to tell people to check out your tab."/>


        <link rel="image_src" href="http://www.decibio.com/store/report_icon/medium/1375336395_Rx Tools report icon.jpg" />
        <link rel="image_src" href="http://www.decibio.com/store/report_icon/medium/1370905582_NGS.jpg" />

        </head>
    <body>


    <?php $url = urlencode('http://www.kokopame.com/test_share_images.php'); ?>

     <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo $url;?>" target="_blank" >Share Metadata Example111</a><br/>

     <?php //echo file_get_contents('https://developers.facebook.com/tools/debug/og/object?q=http%3A%2F%2Fwww.kokopame.com%2Ftest_share_images.php');?>

    </body>
</html>

Thanks,

Mark

You could use the Facebook's Photos API to publish the photos on a user's album.

Required permissions: publish_stream , user_photos

API: \\POST /photos with the required paramters (image, name etc..)

For more details you go here: Photo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM