.Net語言 APP開發平台——Smobiler學習日誌:在應用中添加WeiXin組件

來源:互聯網
上載者:User

標籤:idt   學習   pcr   reg   朋友   hand   ima   body   open   

最前面的話:Smobiler是一個在VS環境中使用.Net語言來開發APP的開發平台,也許比Xamarin更方便 控制項說明

WeiXin組件。

效果示範

1. 分享好友

2. 分享朋友圈

圖1 圖2
方法
方法 方法說明

registerApp

應用註冊(只需要註冊一次即可)。

loginWithWeixin

登入。

pay

支付。

shareToSession

分享給好友。

shareToTimeline

分享到朋友圈。

控制項使用1. 應用註冊
    C#:        //每個裝置只需註冊一次        //方法參數中的appid為平台註冊應用的appid        weiXin1.registerApp("******");                
2. 分享好友
    C#:        WeiXinShareNewsEntity entity = new WeiXinShareNewsEntity("百度一下你就知道News", "百度一下你就知道", "https://www.baidu.com/");        weiXin1.shareToSession(entity, HandleWeiXinRPCResult);                
3. 分享朋友圈
    C#:        WeiXinShareImageEntity entity = new WeiXinShareImageEntity("美圖", "多美的風景圖", "http://img04.tooopen.com/images/20130712/tooopen_17270713.jpg");        weiXin1.shareToTimeline(entity, HandleWeiXinRPCResult);                
4. 委託事件
                   C#:        //簽字圖片儲存        private void HandleWeiXinRPCResult(object sender, Smobiler.Core.RPC.RPCResultArgs e)        {            Toast(System.String.Format("isError{0},error{1},errorCode{2}", e.isError, e.error, e.errorCode));                 }                
注意:

1. 只支援打包版

2. 開發平台註冊的應用ios的Bundle ID和安卓版本的包名需和smobiler雲平台應用程式套件名一致,

3. 開放平台註冊應用建立行動裝置 App時,android中平台資訊的應用簽名為簽名檔案的MD5值,且字母小寫,沒有冒號。例如:q1w2e3r4t5y6u7i8o9p0q1w2e3r4t5y6;md5擷取在雲平台應用-應用安卓打包中,

 

.Net語言 APP開發平台——Smobiler學習日誌:在應用中添加WeiXin組件

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.