سؤال

قمت ببناء تطبيق Windows Phone 7 مع وظيفة "تسجيل الدخول باستخدام Google".مكتبة Google غير متوافقة مع وقت تشغيل Windows Phone، لذلك اخترت Restsharp.

قد تلقى التطبيق بنجاح رمز المصادقة من Google، والخطوة التالية هي تبادل التعليمات البرمجية ل Thinken Access و Think Token.هنا واجهت بعض المشكلة. giveacodicetagpre.

أنا لست متأكدا من كيفية استخدام طريقة الأجيال (أو أي شيء آخر سيكون مفيدا) للحصول على الاستجابة من Google.هل هناك أي رمز آخر مطلوب مسبقا بالنسبة لي لاستخدام هذه الطريقة؟هل يمكن لأي شخص مساعدتي؟

هل كانت مفيدة؟

المحلول

You need to bind a UI element to display the response. That seems to be the gist of the problem you've outlined.

If you want to display the response in your application, you should have a UI element bound to an internal data structure.

Displaying the response

// in xaml, for example MainPage.xaml

<TextBox x:Name="myResponseTextBox">

// in the corresponding MainPage.xaml.cs

client.ExecuteAsync(request, (response) =>
{

   myResponseTextBox.text = response.Content; 

}); 

The Text box will display the result of the callback when it completes.

نصائح أخرى

try:

client.ExecuteAsync(request, (response) =>
{
    var dataToBeParsed = response.Content;
});
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top