Skip to main content

Posts

Showing posts with the label custom button

Google Plus +1 and share

This a html code that can be added to website to share some content on  GooglePlus You can use any image(but select a related one). By clicking on the image, content will be posted on the users G+ account. Consider the following samople code <a href="https://plusone.google.com/_/+1/confirm?hl=en&url=<LINK TO BE SHARED>" <img src="ANY IMAGE" /></a> Also the proper description will be posted, along with the link.

Twitter Custom Share

We can add the tweet button directly from the twitter website. But if you want a image of you wish, then it's easy to get it. <a href="http://m.twitter.com/home?status=WHATEVER-YOU-WOULD-LIKE"> <img src="SOME IMAGE, BUT KEEP IT RELEVANT" /></a> And if you are developing any application and want to implement authentication, use OAuth provided in twitter API: https://dev.twitter.com/docs/auth/oauth Note: You have to register a developer account and create a app there. For authentication use the access token generated on the app settings page.

Facebook Share (URL based)

This is the most simplest way to add a facebook share button. Use the following code as the reference(href) attribute of your anchor tag(<a>) "http://www.facebook.com/sharer.php?u=<text or url to post on wall>" You can use any image to show the share button, but be precise in selecting it, as the user should get on it easily. Consider the following sample code: <a href="http://www.facebook.com/sharer.php?u=https://thechaithanya.wordpress.com"><img src="http://www.acrnet.org/uploadedImages/Get_Involved/facebook-logo.png" alt="share on facebook"></a> If you are developing any applicetion or website and want the post to be displayed as it was posted from your app, like " via theChaithanya ", use the following code:          "http://m.facebook.com/dialog/feed?app_id=YOUR-APP-ID&link=LINK-TO-BE-POSTED&redirect_uri=PATH-TO-LOCATION-AFTER-SHARE" On successful sharing it w...