【问题标题】:Twitter Digits for web - How to set default country in embeddable widgetTwitter Digits for web - 如何在可嵌入小部件中设置默认国家/地区
【发布时间】:2016-08-25 04:44:52
【问题描述】:

我想在网页版 Twitter Digits 中将我的默认国家/地区设置为 +92。这可以在按钮单击事件上完成。但我不希望它在按钮点击上。

function onLoginButtonClick(event){
  Digits.logIn({
    phoneNumber: '+92'
  })
    .done(onLogin) /*handle the response*/
    .fail(onLoginFailure);
}

我想以我的默认国家/地区显示可嵌入小部件。任何可能的解决方案?

【问题讨论】:

    标签: twitter twitter-digits


    【解决方案1】:

    经过几天的搜索。我从twittercommunity 中发现,phoneNumber: '+92'accountFieldstheme 可以传递给嵌入函数

    Digits.embed({
      container: '#my-digits-container',
      theme: {
       /* Input fields borders */
      },
      phoneNumber: '+92',
      accountFields: Digits.AccountFields.Email
    })
    .done(onLogin) /*handle the response*/
        .fail(onLoginFailure);
      };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-06-23
      • 2018-01-30
      • 2021-05-23
      相关资源
      最近更新 更多