digits-cordova
digits-cordova copied to clipboard
Sucesscall back
Hi,
Do you know how to get phonenumber in sucesscall back function? Do you have full html code example ?
Thanks a ton! :)
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
Hi thanks for you quick answer :) But this package won't work on iOS devlopper told me :/ is that right ?
As far as I know, it works on iOS. The main problem might be getting it approved in the app store
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.
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.
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 ?
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.
Please send example code by which i can get phonenumber
@yangli1990 yangli1990 could you please help :)? :100: thanks
Can you wait 2 days? I'll build an example. I've got a lot on my plate right now.
ok
@yangli1990 I was struck with this please upload some sample application.