| | | | How can we promote our contents in social networks? |
Nowadays we often hear that the Web is becoming more and more "social" due to the strong influence of social networks such as Twitter, Facebook, LinkedIn, Orkut, and so on. In this article we will examine how we can share our website's pages and contents through these networks. If we look at the websites that we browse to read news, blogs and all kinds of contents, we can see that they give us the possibility to share what we’re reading with our friends on Facebook, our followers on Twitter, Google Buzz and a large number of social networks and social bookmarking tools.
This gives us the possibility to recommend readings to people we know, thus increasing the probability that someone in our network of connections is interested in reading them. In this way, they are spread over the network, which becomes a very effective way of making something known on today's Web.
What we want to achieve is displayed on the image below; that is to say, we want to have these buttons that allow us to share what we’re viewing through social networks.
In order to do this with GXportal, we can create a free HTML where we place the parts of HTML code indicated below, joining them to obtain what’s displayed in the above image. Next, we use the free HTML GXportlet that can be inserted in the page that will be used to expand contents or that can be used in the website’s templates so that these buttons are always displayed on all the website’s pages.
Below you will find separate code snippets that indicate to which button they belong to.
First, the Tweet This button:
<a href="javascript:(function(){TwitThisPop=window.open(%22http://twitthis.com/twit?url=%22+encodeURIComponent(location.href)+%22&title=%22+((document.title)%20?%20encodeURIComponent(document.title.replace(/^\s*|\s*$/g,%27%27))%20:%20%22%22),%20%22TwitThisPop%22,%20%22width=600,%20height=500,%20location,%20status,%20scrollbars,%20resizable,%20dependent=yes%22);%20setTimeout(%22TwitThisPop.focus()%22,%20100);%20})()"><img alt="TwitThis" src="https://www.gxportal.com/media/images/twittersml.gif?timestamp=20170913143413" style="border:none;" /></a>
This one is for the button that allows you to share contents on Facebook:
<script>function fbs_click() {u=location.href;t=document.title;window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(u)+"&t="+encodeURIComponent(t),"sharer","toolbar=0,status=0,width=626,height=436");return false;}</script><a href="http://www.facebook.com/share.php?u=<url>" onclick="return fbs_click()" target="_blank"><img alt="Compartir en Facebook" src="https://www.gxportal.com/media/images/facebook-share.png?timestamp=20170913143413" border="0"/></a>
For the Add This service button:
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&username=xa-4c3f13884cff4e0a"><img alt="Bookmark and Share" height="16" src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" style="border:0" width="125" /></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=xa-4c3f13884cff4e0a"></script>
Note that the first two buttons allow you to customize the image used to show them. In this way, the buttons can be used separately in the event that you don't want to provide all the options together.
|
| | | | | | | | |
| |
|