I am sharing data to twitter.com and facebook.com. Sharing to facebook means automatically sending image, title, and domain it is working fine.
I want to implement in twitter, but it is not taking title and image.
while implementing twitter it is taking only the URL path,ig click the Share on Twitter
<!-- Load Facebook SDK for JavaScript -->
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.12';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Your share button code -->
<div class="fb-share-button" data-href="http://g2evolution.in/spreadit_API/event-details.php?id=MQ==&postedCustonerId=MQ==&eventType=UHVibGlj" data-layout="button_count" data-size="small" data-mobile-iframe="true"><a target="_blank" href="http://g2evolution.in/spreadit_API/event-details.php?id=MQ==&postedCustonerId=MQ==&eventType=UHVibGlj" class="fb-xfbml-parse-ignore">Share on Facebook</a></div> <br><br>
<a href="https://twitter.com/intent/tweet?url=http://g2evolution.in/spreadit_API/event-details.php?id=MQ==&postedCustonerId=MQ==&eventType=UHVibGlj">Share on Twitter</a>
In regards to the share link, you can use the code below:
For sharing the image as facebook, you might want to look a previous answer.