oauth - How to authenticate using Twitter in Windows phone 8.1? -


i have following code login authentication via twitter in windows phone 8.1 application:

user = app.mobileservice.loginasync(mobileserviceauthenticationprovider.twitter);

but in wp8.1 loginasync method requires 2 parameters , second parameter should be: jobject token token provider specific object existing oauth token log in with

what should enter second parameter? object of jobject class twitter access keys? if so, how assign keys object?

the token object needs formatted depending on specific provider. these examples of formats based on providers:

microsoftaccount {"authenticationtoken":"<authentication_token>"} facebook {"access_token":"<access_token>"} google {"access_token":"<access_token>"} azure active directory {"access_token":"<access_token>"}

i took information from: https://msdn.microsoft.com/en-us/library/dn296411.aspx

so maybe like

user = app.mobileservice.loginasync( mobileserviceauthenticationprovider.twitter, "{"access_token":"<access_token>"}");

edit: yeah you're right. can't string

jobject obj = jobject.parse(@"{"access_token":"<access_token>"}");

user = app.mobileservice.loginasync( mobileserviceauthenticationprovider.twitter, obj);


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -