MissingManifestResourceException从windows phone 8.1 app发布到twitter

时间:2015-05-23 14:10:37

标签: c# windows-phone-8.1 tweetinvi

我可以从模拟器发布到Twitter。

我的代码:

private async Task PublishTweet()
    {
        StorageFile file = await ApplicationData.Current.LocalFolder.GetFileAsync("shareImage.png");
        var credentials = TwitterCredentials.CreateCredentials(App.localSettings.Values["TwitterAccessToken"].ToString(),
            App.localSettings.Values["TwitterAccessTokenSecret"].ToString(),
            "XXX", "XXX");

        TwitterCredentials.SetCredentials(credentials);
        byte[] file1 = await ReadFile(file);
        var shareTweet = Tweet.CreateTweet(App.ViewModel.CurrentItem.Description + " #" + ResourceLoader.GetForCurrentView().GetString("Hashtag"));
        shareTweet.AddMedia(file1);

        var result = await shareTweet.PublishAsync();

                }

但是从设备调试,会在最后一行抛出MissingManifestResourceException

var result = await shareTweet.PublishAsync();

1 个答案:

答案 0 :(得分:0)

Tweetinvi(0.9.8.1)的最新版本解决了这个问题