Reputation: 290
We are facing a very strange issue in LinqToTwitter api. In our application we are using it for twitter authentication. It works fine for we developers, in Dubai. It works fine for our secondary customer, in Dubai. It works for another deep testing team may be in UK.
But it doesn't work for the primary client in Jordan. Does it make sense?
we are using same code each and everything. The same build passes from 3 level but for actual client they get the api error.
My code is given below.
void Page_Loaded(object sender, RoutedEventArgs e)
{
initTwitterPIN();
this.PinAuth.BeginAuthorize(resp =>
Dispatcher.BeginInvoke(() =>
{
switch (resp.Status)
{
case TwitterErrorStatus.Success:
break;
case TwitterErrorStatus.TwitterApiError:
case TwitterErrorStatus.RequestProcessingException:
AppHelper.ErrorOccured(resp.Exception);
AppHelper.ShowMessage(Resources.AppResources.TwitterAuthFail);
NavigationService.GoBack();
break;
}
}));
}
private void initTwitterPIN()
{
this.PinAuth = new PinAuthorizer
{
Credentials = new InMemoryCredentials
{
ConsumerKey = AppSettings.TwitterConsumerKey,
ConsumerSecret = AppSettings.TwitterConsumerSecretKey
},
UseCompression = true,
GoToTwitterAuthorization = pageLink =>
Dispatcher.BeginInvoke(() =>
{
lblMsg.Visibility = System.Windows.Visibility.Collapsed;
OAuthWebBrowser.Navigate(new Uri(pageLink, UriKind.Absolute));
})
};
}
In response in Page_loaded resp.Status contains value of TwitterErrorStatus.TwitterApiError and it only happens for client testing in Jorden and i am banging my head in walls.
Upvotes: 0
Views: 65
Reputation: 290
A very awkward solution to a more awkward problem. The date and time settings should not be automatic on the device. Isn't it wired? but its true, setting phone's date time settings to manual worked for me :)
Upvotes: 2