Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: MissingManifestResourceException publishing from windows phone 8.1 app

$
0
0
I can publish to Twitter from the emulator.

My code:
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();

}
But debugging from device, throws the MissingManifestResourceException at the last line
var result = await shareTweet.PublishAsync();

Viewing all articles
Browse latest Browse all 4126

Trending Articles