Windows Phone 프로젝트에서 TweetSharp를 사용하고 있는데 무엇을해도 미디어가있는 트윗을 게시 할 수 없습니다.Windows Phone에서 SendTweetWithMediaOptions을 사용할 수 없습니다.
예외가 발생합니다. 195 : 매개 변수가 없거나 유효하지 않습니다.
나는 이것이 잘못된 데이터의 원인 일 수 있다는 것을 읽었습니다. 내가 제공 한 스트림이 유효하지 않은 것처럼 말입니다.) (
MediaLibrary 라이브러리 = 새로운 MediaLibrary;
나는 다른 방법을 시도했지만 아무것도 단순화
공유 코드는이처럼 ... 나도 같은 예외를 얻을 작동하지 않습니다
var picture = library.Pictures[0];
var options = new SendTweetWithMediaOptions
{
Images = new Dictionary<string, Stream> { { picture.Name, picture.GetImage() } },
Status = TweetTextBox.Text,
};
AutentificateTwitterService().SendTweetWithMedia(options, (status, response) =>
_dispatcher.BeginInvoke(() =>
{
DonePosting();
if (response.StatusCode == HttpStatusCode.OK)
{
_lastPostId = status.Id;
}
else
{
MessageBox.Show(String.Format(
"There was an error sending image to Twitter{0}{1}",
Environment.NewLine,
response.Error));
}
}));
linqtotwitter와 공유를 시도했지만 TweetSharp가 내 프로젝트에 더 적합합니다.