Code Monkey home page Code Monkey logo

tweetmoasharp's People

Contributors

adrianpell avatar ajukraine avatar arnoldchan avatar bhasden avatar braahyan avatar calbucci avatar caraxe avatar collinsauve avatar danielcrenna avatar dansaltmer avatar davidchristiansen avatar diaconu13 avatar djhi avatar juliengrimault avatar karlisf avatar kensykora avatar mfloryan avatar mikeosborn avatar nyxtom avatar rheckart avatar samkelleher avatar simcon avatar timurgilfanov avatar yortw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tweetmoasharp's Issues

Posting Image along with summary and URL

Hi,
I'm using TweetResharp to post an article on subscribed Twitter account. I'm able to post the tweet header and just Image. But I need to be able to post something like what i have attached. please let me know if we have this provision with TweetSharp?

tw

How can i undo self retweet?

there is unretweet in official API but not in moasharp. I'm using delete api to undo retweet but it is not good for undo self retweet. Is it not added yet or not supported?

GetRequestToken on Windows Store App

I pulled down your package from NuGet for use in a windows store app. I tested it with my test console and everything works great. When I added the package to the windows store app I am getting an error indicating GetRequestToken() requires at least 1 parameter, which doesnt seem to be required in my test use of the package.

Can't post to Twitter feed

I'm using the latest TweetMoaSharp and am a bit baffled with this error.

It is in a server environment, where the client sends us the accessToken and accessTokenSecret to be stored online. I'm running the following code:

var service = new TwitterService("consumerKey", "consumerKeySecret");
service.AuthenticateWith("accessToken", "accessTokenSecret");
var result = service.SendTweet(new SendTweetOptions { Status = "Test post" });

However at the end, result is null, and the post does not appear.

TweetSharp vs Tweetmoasharp

Newbie using Twitter with those targets and questions:

Which latest API Twitter ?
Limitations for get tweets, download images, etc ?
How can I get your all tweets list ?
And download photos and videos from anyone timeline too ?
How get the list of followers and following ?
How send DM anyone user ?
How can I follow to user ?
How manage lists ?
How get favorites lists ?

I want to do it programmatically using C# but for .NET, I have not seen many samples official Twitter:
NOw, I have found 2 API: TweetSharp vs Tweetmoasharp
https://github.com/danielcrenna/tweetsharp
https://github.com/Yortw/tweetmoasharp/

Which is the recommended ? Can I do all my targets ?

Mindly notes:

Any good getting started with Tweetmoasharp? step by step in 10 minutes?

IMHO, better samples for minimize learning curve are real applications with full source code and good patterns and practices

Full source code sample REAL application? not Demo, only real applications?
Like for small to medium applications development, but open source, if you can sharing or maybe another real project or production-ready application using.

main influences, are full of innovative ideas that can free our minds to explore new techniques, patterns and paradigms.

You want to use technologies that allow for rapid development, constant iteration, maximal efficiency, speed, robustness and more. You want to be lean and you want to be agile. You want to use technologies that will help you succeed in the short and long term. And those technologies are not always easy to pick out.

Mindly notes 2

Why not working together ?

https://tweetinvi.codeplex.com/90
https://www.nuget.org/packages/TweetinviAPI45

https://linqtotwitter.codeplex.com/36
https://www.nuget.org/packages/linqtotwitter28

https://github.com/opentig/TwitterIrcGateway30

https://github.com/danielcrenna/tweetsharp
https://github.com/Yortw/tweetmoasharp/

Access to other Twitter APIs - e.g. Ads API

I'm working on access to the Twitter Ads API - which lives on a different endpoint (https://ads-api.twitter.com). Unless I'm totally mistaken, that doesn't seem to fit into the current model where the endpoint is in Globals.

Do you have any suggestions on how to go about this and would you be interested in a PR for this when I'm done?

Great job on keeping this alive :-)

Problem with UAP?

Hi,

is there a problem with UAP again? If i create a NEW App. Download only tweetmoasharp with nuget go to the "MainPage.xaml.cs" und use this function. The App never comes the line with "returnval = ....". So it looks like SearchAsync got a problem :/.

public static async Task<List<TwitterStatus>> GetTestTweets()
{
    var returnval = new List<TwitterStatus>();

    try
    {
        var service = new TwitterService(ConsumerKey, ConsumerSecret);
        service.AuthenticateWith(AccessToken, AccessTokenSecret);

        var results = await service.SearchAsync(new SearchOptions { Q = "#test", Count = 50 });
        returnval = new List<TwitterStatus>(results.Value.Statuses);
    }
    catch (Exception exc)
    {
        System.Diagnostics.Debug.WriteLine(exc.Message);
    }

    return returnval;
}

The same code works very well on a normal WPF or Command Line-Application.

Issus in Nuget package?

Since Nuget Update to 3.1 i got errors on UAP-Projects while Newtonsoft.Json it self is installed with nuget. U can simply reproduce it:

  • Create new UAP-Projects in VS2015 (RTM)
  • Install Newtonsoft.Json with nuget (atm 7.0.1)
  • Install TweetMoaSharp
  • Run

Sorry for the german Error-Messages :)

error

Upload media not working

I cannot upload media and attach the mediaId with a tweet. It always return null for the uploadmedia method.

Adding TweetMoaSharp via NuGet adds also a reference to NUnit

Hi community,

I was just wondering, why adding TweetMoaSharp to my C# project via NuGet also adds a reference to NUnit? Is this really necessary? I prefer to have production code and related unit tests in two different projects, so you can easily publish production code as NuGet package without a reference to unit test libraries.

Best Regards,
Mark

How do I send a tweet with an emoji?

Haven't found how to do so.

The Can_parse_multibyte_entities() unit test definitely shows that tweets with emoji can be read :), but how do I send one with an emoji in it?

Using the official Twitter API (https://github.com/twitter/twemoji), for example, I can replace the thumb up emoji with 👍. I just haven't found how to send this html fragment with the tweetmoasharp library. Or is there an easier way?

Thanks!

Video's in Direct Messages

This bug has been in Tweetsharp since way back. If you send someone a video via DM, it can't be deserialized properly, throws the error

Newtonsoft.Json.JsonSerializationException: 'Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'TweetSharp.TwitterDirectMessage' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '', line 1, position 1.'

Incompatibility with Newtonsoft.json.dll 7

I've tried to use the 4.0 dll in a project where we have upgraded to 4.0 because a new dll requires Newtonsoft.json.dll with the latest 7.0 version.
Unfortunately that causes an error trying to use the released dll

System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'

I've managed to get the sources and compile just the project that I need with the updated dll, but I think that it would be great if you could push a new release compatible with the 7.0 version.

Thank you.

(Maybe) tweet.IsRetweeted and tweet.IsFavorited don't work

                        bool Retweeted = tweet.IsRetweeted;
                        bool Favorited = tweet.IsFavorited;

these are always return 'false' though I did retweet.
is this incorrect use?

and how can i load mute list?
'TwitterService.ListMutedUsers' returns 'long' type unlike 'TwitterService.ListBlockedUsers'.

:)
sorry for my terrible English

Uploading A Video As Media Won't Work

Hi Yortw, thank you for the time in maintaining a really nice C#.net wrapper for C# developers.

I was trying to upload a video using service.UploadMedia(Options) where Options contained the stream of my video file. The function returned null. It works for Images but not for videos. Please advise.

If there's no video uploading api wrapper yet, then please consider this as a feature request.

Many thanks,

UploadMedia is not working with Mono and Linux (Docker Container)

At first, thank you, to bring tweetsharp back to live.
We use TweetMoaSharp and it works great with windows, but we switched our infrastructure to linux docker.
Now, we have a problem with UploadMedia.
Twitter gives us an error back.
The stream content object is not correct.
The problem is the hammcock library, it uses to create the stream content object an StringBuilder. This StringBuilder use Environment.Newline to add new lines.
This Newlines are different between Windows and Linux.

I know this is a small issue, we have our workaround and .NET CORE is the new way to go. But i thought it is not a bad idea to report this issue.

Support new direct_messages/events API

The old DM API is deprecated and the migration guide suggest that:

Developers should migrate to the relative API endpoint as described below by August 16th, 2018.

This is a very significant rewrite of the DM API. Main changes to be aware of:

  • Pagination is achieved via cursors rather than since_id and max_id
  • This combines both sent and received message
  • Only 30 days worth of events can be retreived
  • The response events no longer contain the screenname, only the user id. This makes it difficult to determine who is sending and who is receiving the message if consumer is used to working with screennames. (thread on the forum)

Additionally, based on the documentation provided, I can't tell what events.message_create.message_data.entities.symbols includes.

ListDirectMessagesSent() does work ?

I've been trying for days to get the list of the direct messages that I have and it doesn't do anything,it works or is just deprecated ?

Thank you!

Profile Banner Url

users/lookup provide profile_banner_url field to access profile banner path.
Will you add this field to TwitterUser class?

Tweet with broken encoding causes issues with TextAsHtml and serializing as XML complains about

A bug in my application surfaced when pulling in this tweet: https://twitter.com/BZTHEEZE/status/637228279825608706 with Emoji and what looks like a complete gibberish character.

I'm not sure if there's anything that can be done about this I'll describe the symptoms and then say what I think the issue may be. My experience with Unicode encodings isn't good enough to be sure.

This issue also appears in Tweetsharp 2.3.1.2-unofficial

First, TextAsHtml ends with the link https://t.co/W2TeREt0Hdt0Hd - the extra t0Hd at the end shouldn't be there.

Finally, when I include this string in an object which gets serialized to XML (an RSS feed), it complains that a high surrogate character must always be paired with a low surrogate character.

I would imagine the slightly skewed link is because the offsets in the entities returned by Twitter don't match the reality. It appears that source of the Tweet itself is damaged, as if it's sending UTF-16 bytes over the wire and declaring them as UTF-8 or something.

Serializing to Json, including the string in a website or my own API all work fine, the issue for me only surfaces when I try to serialize in XML. Therefore before I serialize the object, I run the text through these functions:

private static readonly Encoding Utf8Encoder = Encoding.GetEncoding(
    "UTF-8",
    new EncoderReplacementFallback(string.Empty),
    new DecoderExceptionFallback());

private static string RepairStringEncoding(string str)
{
    return Utf8Encoder.GetString(Utf8Encoder.GetBytes(str));
}

...which serializes without exceptions albeit with the extra characters in the link (t0Hd).

Thanks for reading, I'm curious to know your thoughts and whether you think such an issue should be addressed within TweetMoaSharp itself or by the applications that use it. And whether you think the Tweet is "damaged" or perhaps a bug in their API?

Thanks as always,
Steve

Chunked Media Upload - "Could not authenticate you"

Hi,

I've been trying to upload a gif image in a chunk based approach in the following way:
`var service = new TwitterService(_consumer_key, _consumer_secret);
service.AuthenticateWith(AccessToken, AccessTokenSecret);

var cMediares = await service.UploadMediaInitAsync(new UploadMediaInitOptions() { "image/gif", TotalBytes = 38656, MediaCategory = TwitterMediaCategory.AnimatedGif});`

But in response i'm getting an error, '32: "Could not authenticate you."' at service.UploadMediaInitAsync call.

Your kind help will be much appreciated.
Thanks.

Can't Tweet with Some Characters

There is an issue in the original TweetSharp repository that suggests some characters cause tweets to fail. This is specifically listed as a problem when the tweet includes media, but may just be an issue with the character encoding regardless of what else in the tweet. A sample message that causes the problem is;

"Hello à ...."

There is also a suggestion that the apostrophe character ' may cause similar issues. To quote the original issue;

After search, I have immediately error if message contains ' (quote) character such as " L'image ". If I try the message " L image ", tweet will be send with no error.

Incompatible with .Net Core 1.0

I'm putting together a test/example .NET Core app and am having issues using your library. When adding TweetMoaSharp from NuGet I get the following output from the Package Manager.

Package TweetMoaSharp 3.0.0.15 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package TweetMoaSharp 3.0.0.15 supports:
  - net20 (.NETFramework,Version=v2.0)
  - net35 (.NETFramework,Version=v3.5)
  - net40 (.NETFramework,Version=v4.0)
  - net45 (.NETFramework,Version=v4.5)
  - portable-win81+wpa81 (.NETPortable,Version=v0.0,Profile=Profile32)
  - sl4 (Silverlight,Version=v4.0)
  - sl4-wp (Silverlight,Version=v4.0,Profile=WindowsPhone)
  - sl4-wp71 (Silverlight,Version=v4.0,Profile=WindowsPhone71)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.

Any suggestions on how to get the library working properly in .NET Core 1.0 or are there dependencies that make it impossible?

Send Tweet with Multiple Images

I believe Twitter implemented this after TweetSharp stopped being supported, so it probably doesn't work. We should implement this feature.

Any change of a NET46 build?

All is working well, it's just that Visual Studio keeps complaining about conflicts between different versions of the same dependent assembly.

URL Shortening -- not working?

Supposed to check help/configuration to know how many characters are available for shortening, I can't figure out how to access that via TweetSharp, so I'm estimating a few more than currently used.

However, when I pass the status with a longer URL, it should auto-shorten according to Twitter Dev, but I'm getting Error 186, too long.

Any advice for where to look?

How to use TwitterService.StreamFilter with options

Is it possible to specify any options with the filter. When I use this method the twitter endpoint is yelling at me: "No filter parameters found. Expect at least one parameter: follow track locations".

Fetching 280 character tweets

Is any development being made in TweetMoaSharp to support fetching tweets longer than 140 characters ?(up to 280 characters, the current maximum)

TwitterService.ListMutedUsers Returns Id's not Users

There is already a ListMutedUserIds and ListMutedUsers should return user objects rather than ids to be consistent with the rest of the API. Although this would be a breaking change it seems worth while fixing.

Retweet with Quote (Embedded Tweet)

Twitter have just added support for retweeting and quoting the original tweet as an embedded status, which saves characters in the retweet. We should find out what, if anything, is required to support this and implement it.

Include Hammock as a dependency

How come you have choosen to include the Hammock.ClientProfile assembly in the package?
Wouldn't it make more sense to declare it a dependency?

JSON parsing error with ListSuggestedUsers?

Hi -

This snippet crashes with a JSON error.

ListSuggestedUsersOptions opt = new ListSuggestedUsersOptions();
opt.Lang = "en";
var c = service.ListSuggestedUsers(opt);

Thank you!

get retweets media

hi
this is my code . i have no media entities for retweets . whats th problem . how can i fix it
var service = new TwitterService(_consumerKey, _consumerSecretKey); service.AuthenticateWith(_acessToken, _accessTokenSecret); //var currentTweets = service.ListTweetsOnSpecifiedUserTimeline(screenName: "screen name", page: 1, count: 100); var list = service.ListTweetsOnUserTimeline(new ListTweetsOnUserTimelineOptions() { ScreenName = "ali_persian999", });

Any plans for application-only authorization?

The ability to pull down a public timeline would be a welcome addition... and would solve a big problem for me particularly. I really only need it for GET statuses/user_timeline...

Problem with Hammock.WinRT.dll

Hi, I have noticed a problem with TweetMoaSharp nuget package. I have installed it from nuget repo, it's working fine, but when I created an appx package of my Windows Phone 8.1 project, it can't pass tests form Windows App Certification Kit. The is a problem with Hammock.WinRT.dll because it is build in debug mode rather than release mode. Can you provide my a release version of Hammock.WinRT.dll or change it in nuget package?
Kacper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.