i want to share my website news in facebook.
how can my visitor share my news in Their Facebook wall ??
The one you linked to simply is a link in the form:
http://www.facebook.com/share.php?u=http://www.yourlinkhere.com
Where you will automatically put your link into the bolded piece
Some Javascript that will do this is:
<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a>
<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript">
</script>
Related
I have successfully added event tracking to the banners on my website but I have a query that I cannot find an answer to after searching for hours.
Can I use UTM tracking alongside Event tracking?
The reason I ask this is because if a client advertises on the website using a banner but specifies a link such as - www.clientwebsite.com&utm_medium=display&utm_source=mywebsite.com&utm_campaign=Autumn+Collection&utm_term=Shoes - but my website code already has event tracking on it - would it work on both ends so that I see who clicked on the banner and the client could see the traffic from the banner to their site?
Below is the code that I am using to get track the clicks on the banner:
<a href="http://www.website.com" onClick="ga('send', 'event', 'Top Banner', 'Banner_Click', 'Example Top Banner');" target="_blank">
<img class="mid-banner" src="/images/banners/middle/companyname_banner_month_year1.jpg" />
</a>
So basically the code would be:
<a href="http://www.clientwebsite.com&utm_medium=display&utm_source=mywebsite.com&utm_campaign=Autumn+Collection&utm_term=Shoes" onClick="ga('send', 'event', 'Top Banner', 'Banner_Click', 'Example Top Banner');" target="_blank">
<img class="mid-banner" src="/images/banners/middle/companyname_banner_month_year1.jpg" />
</a>
Can I do that?
Any help would be much appreciated!
Cheers,
Dave
Yes. Event tracking is not bothered by parameters in the link URL, it is absolutely fine to use both.
The only thing you need avoid is UTM parameters for internal links to your site (since that would overwrite the original campaign info and start a new session) but that does not seem to be your use case; as long as the URL points to a third party site you are fine.
How to enable images to be shown when a link is shared in whatsapp? Like the link above from amprandom.blogspot.com.
OG tags modified as needed. Still does not show images. How to get it work?
You can use the Sharing Debugger to see the information that is used when your website content is shared on Facebook, Messenger and other places. The Batch Invalidator will let you refresh this information for multiple URLs at the same time. Open Graph markup lets you take control over how your website content appears to others.
Reference: https://developers.facebook.com/tools/debug/
Steps:
Add needed og tags ex. og:title, og:image, etc in your website code.
After adding necessary tags, go to Sharing Debugger and enter your website URL there.
Click on Debug. It will show all the data scrapped by it and refreshes them.
Next time you share your website/link, it will scrap metadata added to it.
Edit:
You need to add itemprop to the og:image meta-tag
Ex: change value of url_image to your image/ logo/ favicon url.
<meta property="og:image" itemprop="image" content="url_image">
Thumbnail schema from schema.org inside for WhatsApp
<link itemprop="thumbnailUrl" href="url_image">
<span itemprop="thumbnail" itemscope itemtype="http://schema.org/ImageObject">
<link itemprop="url" href="url_image">
</span>
I would like to add a share link from my wordpress website to tweeter.
I found how to do it but, I would like to remove the twitter logo and add a simple text link.
So I removed the twitter class "twitter-share-button" but I can't retrieve informations into the twitter textbox...
Here is my code:
<a href="https://twitter.com/share" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-hashtags="hashtag" >THIS_TEXT_THAT_I_WANT_TO_DISPLAY and add all data content to the twitter text area</a>
<script>
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){
js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);}}
(document,"script","twitter-wjs");
</script>
Thanks
You can build your own Twitter share URL. You don't need to include any javascript or the Twitter SDK, it's just an HTML link. More info on building your own at https://dev.twitter.com/docs/tweet-button, just scroll all the way to the bottom of the page. Try something like this for yourmarkup:
Tweet this
There are a lot of things you can pass into the url, so you can tweak this to get the result you're looking for.
Here is the result code:
Tweet this
I'm trying to get the facebook comments plugin working on my aspx page..but it is not appearing on the page.
I am using the Facebook.NET api from codeplex for authorization. I inserted the code that was generated from the Facebook Comments plugin page...
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#appId={MyApp's ID}&xfbml=1"></script>
<div>
<fb:comments numposts="15" width="425" publish_feed="true"></fb:comments>
</div>
I can see that the script is retrieved by inspecting the resulting html code in firebug...but can't figure out why the plugin is not being rendered...
any help is appreciated...thx
Ok, i found out the solution,
It seems that the tag should be within the element.
just move the script tag within the and it will work
Following code worked for me.
<div id="fb-root">
<script src="http://connect.facebook.net/en_US/all.js#appId=__YOUR_APP_KEY_HERE&xfbml=1"></script>
</div>
by doing the above i got the comments box to show up....
Now the problem is that, when i click on the POST Button, it doesn't post it... have to figure out why... anyone has solution for this ?
I am playing with Wordpress 3 for the first time and had a quick question.
I am placing ads on a site and wondered the best practice to add in the script. The code that Google generates is in 2 parts, one for the of the page and one where the ad should go
The head code is in the form
<script type='text/javascript' src='http://partner.googleadservices.com/gampad/google_service.js'>
</script>
<script type='text/javascript'>
GS_googleAddAdSenseService("ca-pub-123123");
GS_googleEnableAllServices();
</script>
<script type='text/javascript'>
GA_googleAddSlot("ca-pub-123123", "300x250_Ad");
</script>
<script type='text/javascript'>
GA_googleFetchAds();
</script>
Then the code for the ad is:
<!-- ca-pub-123123/300x250_Ad -->
<script type='text/javascript'>
GA_googleFillSlot("300x250_A");
</script>
I downloaded a plugin Advertising Manager that allows me to add ads into the page but only seems to allow putting in one block of code. I can add all the code joined up but if I want to add other ad positions later it is not the best...
I can't go into my Theme and add the code in there, as I am using Multiple Sites the code will need to difer from site to site, is there something very simple I am missing to add stuff into the and then I can use Advertising Manager to display the individual ad code...
Try using the the AdSense-Deluxe WordPress Plugin
It would appear the plugin has a bug, the shortcode you're using is calling a function which is directly outputting the code for DFP (which is called when wordpress is preparing the page content, hence it appearing all at once at the top) instead of returning it to be inserted throughout the content.