分享此图片共享无法在PHP网站上的Facebook / Twitter上运行我在基于PHP的网站上使用ShareThis插件,涉及图像上传和处理。我想让人们分享最终处理过的图片,以及指向页面的链接。
<div class="container-fluid">
<div id="title">
<h1> South Florida Speaks</h1>
</div>
<div class="col-sm-8 col-sm-offset-2 col-lg-6 col-lg-offset-3" id="paragraph">
<div class="row">
<p>The South Florida Speaks series is put on by LaunchCode to highlight the variety of programming languages used by local employers and entreprenurs in the local area. </p>
<br>
<p>Miami is well known for being multicultural; many people speak a second or third language. We want to make saying "I speak JavaScript" or "I speak .NET" just as common as telling someone that you speak Spanish or Creole.</p>
<br>
<p>
<em>
<a href="#" class="inline-link lc">Check out our list of upcoming events</a>!
</em>
</p>
</div>
</div>
<div>
<div id="finalImgContainer">
<?php
if (!empty($_POST["submit"]) && $_POST["submit"] == "submit") {
echo '<div class="row" id="finalImage">
<img src= "';
$imageUrl = 'resources/uploads/' . session_id() . '/' . basename( $imageWithText );
echo $imageUrl;
echo '"><div>';
echo "<div class='row' id='shareThisRow'><span class='st_sharethis' st_url='http://www.sfspeaks.com/{$imageUrl}' st_title='South Florida Speaks' st_image='http://www.sfspeaks.com/{$imageUrl}' displayText='ShareThis'></span>
<span class='st_facebook' displayText='Facebook'></span>
<span class='st_twitter' displayText='Tweet'></span>
<span class='st_linkedin' displayText='LinkedIn'></span>
<span class='st_pinterest' displayText='Pinterest'></span>
<span class='st_email' displayText='Email'></span></div>";
// echo "<div class='shareaholic-canvas' data-app='share_buttons' data-app-id='23146239' data-title='South Florida Speaks' data-link='http://www.sfspeaks.com/' data-image='http://www.sfspeaks.com/{$imageUrl}' data-summary='Description of the page you are sharing'></div>";
}
?>
</div>
</div>