{"id":15673445,"url":"https://github.com/jwebcoder/socialshare","last_synced_at":"2025-03-30T05:43:31.269Z","repository":{"id":72769625,"uuid":"12251648","full_name":"JWebCoder/SocialShare","owner":"JWebCoder","description":"JavaScript plugin to create sharing buttons","archived":false,"fork":false,"pushed_at":"2014-02-20T14:35:00.000Z","size":1000,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T08:08:31.162Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://jwebcoder.github.io/SocialShare/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JWebCoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-08-20T19:06:53.000Z","updated_at":"2015-05-28T11:43:28.000Z","dependencies_parsed_at":"2023-02-23T09:00:17.235Z","dependency_job_id":null,"html_url":"https://github.com/JWebCoder/SocialShare","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWebCoder%2FSocialShare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWebCoder%2FSocialShare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWebCoder%2FSocialShare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JWebCoder%2FSocialShare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JWebCoder","download_url":"https://codeload.github.com/JWebCoder/SocialShare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246281216,"owners_count":20752207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T15:40:37.172Z","updated_at":"2025-03-30T05:43:31.252Z","avatar_url":"https://github.com/JWebCoder.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"SocialShare\n===========\n\nJavaScript plugin to create sharing buttons\n\nSocialShare 0.93 javascript plugin\n-----------\n\nIn our days, everyone wants to share their website content to the most used Social Networks.\n\nWith this in mind, i’ve created a new JavaScript Plugin called SocialShare.\n\nThe objective is to simplify the process of sharing your content to the Social Networks, by calling only one function in JavaScript and let it do the rest.\n\n\nVersion 0.93 supports\n-----------\n\nFor now, the plugin supports twelve Social Networks:\n\n* Facebook\n* Twitter\n* Linkedin\n* Google +\n* Google bookmarks\n* Pinterest\n* Tumblr\n* Delicious\n* Reddit\n* Tapiture\n* Stumbleupon\n* Newsvine\n\nAnd the new feature Themes\n\nThis is how it works\n-----------\n\nFirst we need to create the object in JavaScript:\n\n    var sharer = new SocialShare();\n\nSimple right?\n\n### Now let’s share something to facebook:\n\n    \u003ca href=\"javascript:void(0)\" data-type=\"facebook\" data-url=\"jwebcoder.wordpress.com\" data-image=\"http://jwebcoder.files.wordpress.com/2013/07/jwebcoder.jpg\" data-Title=\"JWebCoder - The blog you can't miss\" data-summary=\"A blog with a little bit of everything in computer programming, applications, games, hardware, etc... Try, view and comment.\" onclick=\"sharer.share(this);\"\u003e\n        \u003cimg scr=\"facebook.png\"/\u003e\n    \u003c/a\u003e\n    \nHere we have five attributes:\n\n* data-type - the social network to share too.\n* data-url - the link you want to share.\n* data-image - the image you want as a thumbnail.\n* data-title - the title of the share.\n* data-summary - the summary of the share.\n\nSame thing happens with the other Social Networks.\n\n### For twitter we have:\n\n    \u003ca href=\"javascript:void(0)\" data-type=\"twitter\" data-text=\"some text\" data-url=\"url\" onclick=\"sharer.share(this);\"\u003e\n        \u003cimg scr=\"smallTwitter.png\"/\u003e\n    \u003c/a\u003e\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-text - the text that will be tweeted.\n* data-url - the link you want to share.\n\n### For linkedIn:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to share.\n* data-title - the title to share.\n* data-summary - the summary of the share.\n\n### For google +:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n\n### For google bookmarks:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n* data-title - the title to share.\n* data-summary - the summary of the share.\n\n### For pinterest:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n* data-image - the image you want as a thumbnail.\n* data-summary - the summary of the share.\n\n### For tumblr:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n* data-title - the title to share.\n* data-summary - the summary of the share.\n* data-share-type - the type of share\n\t* photo - to share a photo\n\t* normal - to share a link\n\n### For delicious:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n* data-title - the title to share.\n* data-summary - the summary of the share.\n\n### For reddit:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n* data-title - the title to share.\n\n### For tapiture:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n* data-title - the title to share.\n* data-image - the image you want as a thumbnail.\n* data-image-title - the image title you want as a thumbnail.\n* data-image-width - the thumbnail width.\n* data-image-height - the thumbnail height.\n\n### For stumbleupon:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n* data-title - the title to share.\n\n### For newsvine:\n\nThe attributes are:\n\n* data-type - the social network to share too.\n* data-url - the link to be shared.\n* data-title - the title to share.\n\nThe data-type attribute\n--------\n\nThis is where we set where we want to share.\n\nFor now, the possible values are:\n\n* facebook\n* twitter\n* linkedin\n* googleplus\n* googlebookmark\n* pinterest\n* tumblr\n* delicious\n* reddit\n* tapiture\n* stumbleupon\n* newsvine\n\nThemes\n--------\n\nIn order to use the themes, we need to pass some data when we create the object.\n\n\tvar sharer = new SocialShare({\n\t\t\"imageManager\":\"shareButton\",\n\t\t\"themeUrl\":\"SSThemes\",\n\t\t\"theme\":\"default\"\n\t});\n\nThis will enable the theme manager, and create the mouse over effect on the chosen share links.\nThe values:\n\n* imageManager - a class used in all the share links.\n* themeUrl - the relative path to the theme folder (default value : SSThemes).\n* theme - the default theme (default value : default).\n\nNow all we need is to add the class we set in the constructor in the share link. Using twitter has example, we have this:\n\n\t\u003ca href=\"javascript:void(0)\" data-type=\"twitter\" class=\"shareButton\" data-text=\"some text\" data-url=\"url\" onclick=\"sharer.share(this);\u003e\n\t\t\u003cimg /\u003e\n\t\u003c/a\u003e\n\n\nAs you can see, there's no need to put in the image source, that is because we are using a theme now.\n\nFunction list\n--------\n\nCallable functions you can use to share to the different social networks.\n\nThey are not meant to be used, has they are inner functions used by the plugin, however, if you want a more direct approach, you can still use them.\n\n### The functions are:\n\n* new SocialShare().facebook(url,imageLink,tittle,content);\n* new SocialShare().twitter(text);\n* new SocialShare().linkedin(url,title,content);\n* new SocialShare().googleplus(url);\n* new SocialShare().googlebookmark(url,title,summary);\n* new SocialShare().pinterest(url,image,content);\n* new SocialShare().tumblr(url,title,summary);\n* new SocialShare().delicious(url,title,summary);\n* new SocialShare().reddit(url,title);\n* new SocialShare().tapiture(url,title,imgUrl,imgTitle,width,height);\n* new SocialShare().stumbleupon(url,title);\n* new SocialShare().newsvine(url,title);\n* new SocialShare().share([HTML Element]);\n\nIf you have any other Social Networks you want me to had, or any doubt about the plugin , just say so.\n\nYou can find me in [facebook](https://www.facebook.com/JWebCoder) or [Twitter](https://twitter.com/JWebCoder)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwebcoder%2Fsocialshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjwebcoder%2Fsocialshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjwebcoder%2Fsocialshare/lists"}