I would like to know if there is a method to create "share" buttons for Facebook, Twitter and Google +1 using only HTML, without any Javascript having to be inserted into the code at any point.
For example, you can use the methods described below to create these buttons dynamically; however they all end up loading Javascript dynamically and creating their own code behind the scenes:
http://developers.facebook.com/docs/reference/plugins/like/
http://twitter.com/about/resources/buttons
http://www.google.com/webmasters/+1/button/
The following links will register the appropriate Likes, Tweets and +1s:
http://www.facebook.com/sharer.php?u=http://example.com
http://twitter.com/share?url=http://example.com&text=Description
https://plusone.google.com/_/+1/confirm?hl=en&url=http://example.com
These links will work for Wordpress:
Facebook
Like
Twitter
Tweet
Google +1
+1
google plus not working in the above example.
I used this for google plus.
<div id="custom-google-button">
google+
</div>
In Wordpress :
google+
Linkedin :
<div id="custom-linkedin-button">
Linkedin
</div>
In Wordpress :
Linkedin
Sources :
https://developers.google.com/+/plugins/share/
https://developer.linkedin.com/documents/share-linkedin
This is a pretty useful article that provides the answer you are looking for without using any PHP - http://www.hanselman.com/blog/AddSocialSharingLinksToYourBlogWithoutWidgetJavaScript.aspx
TWITTER
Twitter
FACEBOOK
Facebook
GOOGLE+
Google+
Related
I have recently started a Blog, The blog is made using Blogger, Then I thought of preparing my site to show ads and then I created a Adsense account and then in the sites section I had given the URL of My Blog and after some days I saw the sites section and there was written that needs attension, Then I clicked on it and I found that there was wriiten a Notice and a code which I have pasted below :-
Copy and paste this code in the HTML of your site, between the and tags.
Your AdSense code
<script data-ad-client="ca-pub-4836518523777258" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
Now I am Confused That where I have to add this code, In my blog theme's HTML which I have installed currently or some where else can someone tell me.
You have actually to connect Blogger to Google AdSense. They have a direct connection, you don't need to add any code.
If you already have Google AdSense
Go to the Earnings Tab on Blogger (top bar, in the dropdown)
Link Your AdSense Account to your Blogger Account there
Specify Where to Display AdSense, you'll have there 3 places to choose from
Go to Your Blog Layout (left menu, "Layout")
Add the AdSense Gadget
Done! You have now ads
How does one control what image and title appear when posting a URL to LinkedIn?
I manage my company's website efficienty and write all the HTML, CSS, jS and PHP when necessary. One nut I cannot crack however is getting LinkedIn to pull the correct image and title when I make a post.
LinkedIn published the following to allow og tags to solve this problem:
I am having difficulty making this work
This is key for me and my team for we frequently post stories, case studies and advertisements which we can't share on LinkdIn because LinkedIn logic usually (not always) doesn't pick up any of the images in our HTML.
Is there a meta tag or something I need to embed in the HTML line?
You can use this tool to test https://www.linkedin.com/post-inspector/inspect/ your page.
Linkedin seems to be using the open graph protocol from Facebook https://ogp.me/
<meta name="image" property="og:image" content="[Image URL here]">
I have always used twitter widget part but I am wondering how can I put the twitter feed just like this site on its footer?
http://www.oliverwyman.com/index.html
Twitter widget code I used
<a class="twitter-timeline" href="https://twitter.com/twitterapi" data-widget-id="YOUR-WIDGET-ID-HERE">Tweets </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>
The example doesn't appear to have a working twitter feed at the minute, but any sort of custom usage of the twitter information now requires use of OAuth authentication. If you visit the twitter API documentation at https://dev.twitter.com/docs then you will be able to find out more information.
Additionally, using javascript with OAuth is "strongly discouraged" according to https://dev.twitter.com/docs/twitter-libraries.
I'm a beginner in facebook.
I try to add the facebook comments box to each of my blog post, i limit it to show 2 comments from the plugins, from the facebook comments box plugin site, they set the url to example.com and it show a whole different UI from what i got.
More importantly, there is no view XX comments after 2nd comment, even i added 20 comments to it.
May i know how can i solve it? is it some setting that i need to set in my facebook app or use the graph api, i know that i can get the json from the facebook graph site as mentioned in the facebook blog developers.facebook.com/blog/post/490/
if i need to solve using json way, how do i append the remaining comments inside the website where it is using iframe.
i wish to have a easier solution like just changing setting inside my facebook app, rather than code an "View xx comments" button to do ajax call and append the result to the dom myself.
Every time I try to embed code that was recommended by another user, I get the same message: Could not retrieve id for the specified page. Please verify correct href was passed in.
All I want is something on my page that a reader can click to take them to my Facebook page. What am I doing wrong?
You can create a personal username for your account on facebook, check Facebook Usernames general information, creating a username will provide you with a custom url something like
www.facebook.com/YOURUSERNAMEHERE
you can easily add this to your blog by using the following html
Follow me on facebook
It would also be helpful if you post the code that you're trying to use currently, otherwise no one has any idea what you're trying to do.
If you just want a link in HTML to your facebook page, put this into your page:
My Facebook Page
The section that goes within the quotes should be the URL you see when you navigate to your Facebook page.
Are you talking about a Page or Profile?
For Pages, the Like Box plugin is probably the best option, and lets people like the Page right from your website: https://developers.facebook.com/docs/reference/plugins/like-box/
For your own Profile, there's Badges ( https://www.facebook.com/badges/ ) which you can use
If it's your own Profile and you want people to Subscribe to you ('Follow') - there's a subscribe button you can use for this: https://developers.facebook.com/docs/reference/plugins/subscribe/
i dont know why, but for some reason, you have to include the http:// before the link