- Home /
How do I login to twitter and make a post with specific text?
I have been self-teaching myself code through the use of the internet. I am close to publishing my first game for Android.
All I want to do is when you die in the game have the option to tweet your score, and will then receive input of your username and password for twitter.
I would need to use Web Requests, if I am correct? I am unfamiliar on how to do that in Unity, Could someone help by posting code or links to code on how to login and post on twitter in Unity3D?
I am using the free version of Unity, if that makes any difference, I am also coding the game in javascript.
I would appreciate any insight to going about installing social features into any game.
Thanks, Zadd
Answer by Graham-Dunnett · Dec 28, 2014 at 10:44 AM
Posting to twitter using their REST api is documented here:
https://dev.twitter.com/rest/reference/post/statuses/update
I believe that WWWForm
will work for you since it causes WWW to create a POST request.
$$anonymous$$aybe write some code outside of Unity to make tweets from code. Once you have that working, re-implement inside Unity.
Answer by ramkesh · May 23, 2019 at 10:41 AM
You can LogIn twitter in your game by using Twitter Kit. It's available on Asset Store . For reference you can follow: https://www.youtube.com/watch?v=yLBgf74Ab30