0
SendTweetWithMedia()에 문제가 있습니다. 수행 방법은 다음과 같습니다.Windows Phone에서 TweetSharp 2.3.0을 사용하는 미디어로 트윗 할 수 없습니다.
var service = new TwitterService(TwitterSettings.ConsumerKey, TwitterSettings.ConsumerSecret);
service.AuthenticateWith(twitterAccess.AccessToken, twitterAccess.AccessTokenSecret);
string status = string.IsNullOrEmpty(message) ? " " : message;
var memoryStream = new MemoryStream();
bitmap.SaveJpeg(memoryStream, bitmap.PixelWidth, bitmap.PixelHeight, 0, 100);
memoryStream.Position = 0;
var options = new SendTweetWithMediaOptions
{
Status = status,
Images = new Dictionary<string, Stream> {{"picture", memoryStream}}
};
service.SendTweetWithMedia(options, (responseStatus, response) => Dispatcher.BeginInvoke(() =>
{
memoryStream.Close();
memoryStream.Dispose();
if (response.StatusCode == HttpStatusCode.OK)
{
UiHelper.ShowToastPrompt(AppResources.TwitterToastPrompt);
}
else if (response.StatusCode == HttpStatusCode.Unauthorized)
{
NavigationService.Navigate(new Uri("/TwitterLoginPage.xaml", UriKind.Relative));
}
else
{
MessageBox.Show(response.StatusDescription, AppResources.ErrorMessageBoxCaption, MessageBoxButton.OK);
}
}));
그러나 메시지 상자에 "금지됨"이 표시됩니다.
심지어 SendTweetWithMediaOptions에서 이미지를 제거하려고했지만 도움이되지 않았습니다.
아무도 도와 줄 수 있습니까? 감사.