{"id":18060325,"url":"https://github.com/unbug/social-reshare","last_synced_at":"2025-04-11T12:11:59.234Z","repository":{"id":31641452,"uuid":"35206686","full_name":"unbug/social-reshare","owner":"unbug","description":"在社交等 app 里 打开 web 页面后再使用 app 自带的分享功能进行二次分享时，指定分享格式。目前支持微信，易信，欢迎贡献其他平台。","archived":false,"fork":false,"pushed_at":"2015-06-17T09:53:26.000Z","size":141,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T17:52:26.136Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unbug.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-07T07:57:55.000Z","updated_at":"2017-05-28T11:23:16.000Z","dependencies_parsed_at":"2022-08-30T21:31:17.262Z","dependency_job_id":null,"html_url":"https://github.com/unbug/social-reshare","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unbug%2Fsocial-reshare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unbug%2Fsocial-reshare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unbug%2Fsocial-reshare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unbug%2Fsocial-reshare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unbug","download_url":"https://codeload.github.com/unbug/social-reshare/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248398368,"owners_count":21097291,"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-31T04:07:44.312Z","updated_at":"2025-04-11T12:11:59.199Z","avatar_url":"https://github.com/unbug.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Readme\n=========\n通常分享一个网页到社交平台（如，微信，易信等），用户在这些平台的 app 里打开并进行二次分享时，理想的分享格式会对你的网页带来可观的流量，不可忽视。\n这些平台有的去抓取特定的内容，有的去抓取指定的 meta 标签，有的则需要监听事件，比较复杂。```SocialAppReshare``` 通过一个方法简化这些操作。\n```SocialAppReshare```会将你指定的分享参数按不同 app 的规则生成好，保证用户点击 app 的分享功能时分享的是你指定的格式和内容。\n\n\nInstall\n==========\n```shell\nbower install social-reshare --save-dev\n```\n\nGet started\n==========\n有两种方式使用本脚本\n\n1.通过 AMD 方式\n\n```js\nvar SAR = require('SocialAppReshare');\n\nSAR({\n   title: String 'share title',\n   text: String 'share text',\n   summary: String 'share summary',\n   imageurl: String 'share image url',\n   thumburl: String 'share image thumb url',\n   link: String 'share link'\n});\n\n```\n\n\n2.通过引入脚本方式\n\n```html\n\u003cscript src=\"dist/sar.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n    SocialAppReshare({\n               title: String 'share title',\n               text: String 'share text',\n               summary: String 'share summary',\n               imageurl: String 'share image url',\n               thumburl: String 'share image thumb url',\n               link: String 'share link'\n           });\n\u003c/script\u003e\n```\n\nBuild\n=========\nBuild 一个压缩的版本到 dist 目录\n```shell\ngulp\n```\n\n\nContribute\n==============\n本项目目前只支持微信，易信，其他平台因本人开发过程中未涉及，会慢慢添加，更重要的是如果你已经在项目中用到了这里没有平台，请不要吝啬贡献你的代码。\n\n急需补充的App：\n - 微博\n - QQ\n - 手机淘宝\n - 【欢迎补充，可以放私家的】\n\n\nFAQ\n===============\n- 本项目只能处理支持 client 端个性化格式的平台，服务端爬虫类的不支持（如 Facebook）。\n- 微信貌似有个域名白名单，如果你的页面在微信里无效可以试试注册公众账号添加。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funbug%2Fsocial-reshare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funbug%2Fsocial-reshare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funbug%2Fsocial-reshare/lists"}