digits-cordova icon indicating copy to clipboard operation
digits-cordova copied to clipboard

Sucesscall back

Open pierrehalleux opened this issue 9 years ago • 13 comments

Hi,

Do you know how to get phonenumber in sucesscall back function? Do you have full html code example ?

Thanks a ton! :)

pierrehalleux avatar Oct 27 '15 11:10 pierrehalleux

No, unfortunately phone number is user sensitive data and twitter will not give it back to us. You can however get the phone number through another Cordova package, cordova plugin add com.simonmacdonald.telephonenumber

yangli-io avatar Oct 27 '15 11:10 yangli-io

Hi thanks for you quick answer :) But this package won't work on iOS devlopper told me :/ is that right ?

pierrehalleux avatar Oct 27 '15 12:10 pierrehalleux

As far as I know, it works on iOS. The main problem might be getting it approved in the app store

yangli-io avatar Oct 27 '15 22:10 yangli-io

Indeed :/ do you see a possible work around to be sure to have it approved on store ?

Thanks a lot

Pierre

Sent from my iPhone

On 27 oct. 2015, at 23:23, Yang Li [email protected] wrote:

As far as I know, it works on iOS. The main problem might be getting it approved in the app store

— Reply to this email directly or view it on GitHub.

pierrehalleux avatar Oct 27 '15 23:10 pierrehalleux

Depends on why you would need the users phone number, you could simply add a input field and ask them for it. If you have a legitimate reason for needing the users phone number then im sure apple would approve.

yangli-io avatar Oct 28 '15 00:10 yangli-io

Please check this link https://docs.fabric.io/web/digits/getting-started.html#set-up-digits-authentication

There is mentioned: From your web server, over SSL, you can use this response to securely request the userID, phone number, and oAuth tokens of the Digits user. With this approach there is no need to configure OAuth signing, or configure and host a callback url for Digits.

So here is mentioned we can access phonenumber.but i am not getting how we can. In success call back function i am getting i.e

{ "oauth_echo_headers":{ "X-Verify-Credentials-Authorization":"OAuth oauth_consumer_key="F1vVaDqvmTQbtoxYhzR6baV55", oauth_nonce="3733735153-f00HtJyPmqKlqQTewerDRudlqvjbtXUfOrji9cDF1vVaDqvmTQbtoxYhzR6baV551445321536239", oauth_signature="ksouZ54Nb2LC6EOfTWYqKaC3iLs=", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1445321536", oauth_token="3733735153-f00HtJyPmqKlqQTewerDRudlqvjbtXUfOrji9cD", oauth_version="1.0"", "X-Auth-Service-Provider":"https://api.digits.com/1.1/sdk/account.json" } }

Can you give example how we can access phonenumber ?

Ajay1412 avatar Oct 28 '15 08:10 Ajay1412

You will need to send that json to your backend and have your backend communicate with twitter digits. Digits will send you back a phone number to your backend.

yangli-io avatar Oct 31 '15 21:10 yangli-io

Please send example code by which i can get phonenumber

Ajay1412 avatar Nov 02 '15 05:11 Ajay1412

@yangli1990 yangli1990 could you please help :)? :100: thanks

pierrehalleux avatar Nov 09 '15 16:11 pierrehalleux

Can you wait 2 days? I'll build an example. I've got a lot on my plate right now.

yangli-io avatar Nov 09 '15 23:11 yangli-io

ok

Ajay1412 avatar Nov 10 '15 06:11 Ajay1412

@yangli1990 I was struck with this please upload some sample application.

anandhakumarr avatar Jan 20 '16 13:01 anandhakumarr