{"id":19680935,"url":"https://github.com/zixiaowang/tns-wechat","last_synced_at":"2026-05-09T09:10:55.559Z","repository":{"id":132695698,"uuid":"94457556","full_name":"ZixiaoWang/tns-wechat","owner":"ZixiaoWang","description":"A WeChat plugin for NativeScript Project.","archived":false,"fork":false,"pushed_at":"2017-06-27T04:35:06.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T05:36:05.475Z","etag":null,"topics":["android","javascript","nativescript","nativescript-plugin","node-module"],"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/ZixiaoWang.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-15T16:17:50.000Z","updated_at":"2024-05-30T16:54:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"4e9cfd65-02ea-43a1-ad1f-fb644e76459a","html_url":"https://github.com/ZixiaoWang/tns-wechat","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZixiaoWang%2Ftns-wechat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZixiaoWang%2Ftns-wechat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZixiaoWang%2Ftns-wechat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZixiaoWang%2Ftns-wechat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZixiaoWang","download_url":"https://codeload.github.com/ZixiaoWang/tns-wechat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240990714,"owners_count":19889928,"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":["android","javascript","nativescript","nativescript-plugin","node-module"],"created_at":"2024-11-11T18:06:29.422Z","updated_at":"2026-05-09T09:10:50.537Z","avatar_url":"https://github.com/ZixiaoWang.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tns-wechat\nA WeChat plugin for NativeScript Project.  \nCurrently this plugin only suport Android platform, iOS is on its way coming.\n\n### I wanna share my stuff to WeChat\nFor Android developer, Please make sure you've gotten the **AppID** from Tecent.\nOtherwise it will FAIL sharing any stuff to WeChat platform.\n\n### How Can I install this plugin?\nAt currently stage, the plugin still need some polishing work before being published. So if you wanna have a trial, or help me find any bugs or inappropriated places, you may install it via entering cammand  \n``` tns plugin add https://github.com/ZixiaoWang/tns-wechat.git```\n\n### How Can I use this plugin?\n**Quick example**\n```javascript\n    import * as WeChat from ('tns-wechat');\n\n    function MyClass(){\n        // Register your appID\n        // 注册你的appID\n        let wechat = new WeChat('wx1234567890123456');\n        \n        // Share Webpage to Timeline\n        // 分享网页到我的朋友圈\n        wechat\n            .sendWebpage('https://www.google.com')\n            .addTitle('Google')\n            .addDescription('This is description')\n            .addThumbnail('data:image/png;base64,AIND923kdf....')\n            .toTimeline();      \n    }\n```\n\n### APIs\n#### isInstalled\n```\n    isInstalled(): boolean\n```\n#### Send\n```\n    sendText(txt: string): WeChat    \n    sendWebpage(url: string): WeChat    \n    sendImage(path: string): WeChat  \n    sendImage(base64String: string): WeChat\n```\n#### Add\n```\n    addTitle(title?: string): WeChat\n    addDescription(description: string): WeChat\n    addMessageTagName(msgTagName: string): WeChat\n    addMessageAction(msgAction: string): WeChat\n    addMessageExt(msgExt: string): WeChat\n    addThumbnail(localPath: string): WeChat\n    addThumbnail(base64String: string): WeChat\n    addThumbnail(image: ImageSource): WeChat\n\n    decorate({\n        title?: string,\n        description?: string,\n        messageTagName?: string,\n        messageAction?: string,\n        messageExt?: string,\n        thumbData?: string or ImageSource (imagePath or Base64String)\n    }): WeChat\n```\n#### To\n```\n    to(target: string): boolean (target must be in [\"session\", \"timeline\", \"favorite\"])\n    toSession(): boolean\n    toTimeline(): boolean\n    toFavorite(): boolean\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzixiaowang%2Ftns-wechat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzixiaowang%2Ftns-wechat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzixiaowang%2Ftns-wechat/lists"}