Async support for Unity Twitter API tools


Recently I opened up these tools to make sure everything still worked as intended and realised that actually, none of what I had built could be performed naturally asynchronously! Sure you could wrap the example function calls inside a coroutine, but that didn't seem entirely suitable. 

In my day job I've been working with more recent C# features previously unavailable in Unity such as Asynchronous methods using the async and await keywords as well as writing code which is more orderly than post university me would have ever thought necessary. Disgusted at my old code, I decided it was time for an update.

New new set of tools feature essentially the same feature set of what was previously available but now have the added benefit of performance and readability improvements. Data structures have been moved to their own namespace, as have helper methods for getting an API access token.

Files

Twitter Tools (async).zip 158 kB
Feb 14, 2019

Get Twitter REST API tools for Unity

Download NowName your own price

Comments

Log in with itch.io to leave a comment.

Hi , I have added support for fetching media files in your twitter plugin.
Just follow the instruction below to add it.  :)

https://pastebin.com/JNXJePy4

Thank you for your awesome tool!

But,search with hashtag does not work.

Normal search work well.

Please tell me how to work search with hashtag.

Hi tkishi117,

Since your search query will be placed into a URL, you'll need to encode the hash character (%23).

Here's a handy resource for this:
https://www.urlencoder.org/

Sorry for the delayed response, hope this helps!

Thanks for this update, when I click download it looks like I'm still getting the old version (along with the async errors). Is there a way to try out the new version? Thanks!

(+1)

Hi Elliott,

I've updated the package today to include a read me containing instructions on how to overcome this issue.

It seems I forgot the include an important piece of information required for the Async plugin to function, the run-time version  of C# for your project must be set to 4.0 or above. This can be done by going to Edit -> Project Settings -> Player) and changing “Scripting Runtime Version” to “Experimental (.NET 4.6 Equivalent)" or "4.X"

If you continue to run into issues, please hesitate to get in touch. If I miss your comment for whatever reason, you can reach me at ctinney94@gmail.com

Thanks, it's working!