- Notifications
You must be signed in to change notification settings - Fork4
Unity Twitter Login/API kit.
License
NotificationsYou must be signed in to change notification settings
sassembla/toriki
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Tori(the Twitter Bird in Japanese) kit -> Toriki.
Ultra lightweight Twitter tool for Unity. supports the SingleSignOn with Twitter app and Twitter API invocation.
Currently, Toriki requires Twitter application in supported platflorms.
- iOS
- Android
- WebGL(under development.)
with Unity 2018.x or later.
Use UnityPackage inreleases.
staticTwitterSettings(){ConsumerKey=string.Empty;// change here.ConsumerSecret=string.Empty;// change here.if(string.IsNullOrEmpty(ConsumerKey)){Debug.Log("ConsumerKey is null. please write some code for setting ConsumerKey.");}if(string.IsNullOrEmpty(ConsumerSecret)){Debug.Log("ConsumerSecret is null. please write some code for setting ConsumerSecret.");}}
get AccessToken & AccessTokenSecret from Twitter.
TwitterAPI.InitWithLogin((nickname,token,secret)=>{// nickname, accesstoken, accesstokensecret is available.// also TwitterAPI is ready now.},(errorCode,message)=>{// failed to log in to Twitter.Debug.Log("login error:"+errorCode+" message:"+message);}
or
log in with stored AccessToken & AccessTokenSecret.
TwitterAPI.InitWithToken("ACCESS_TOKEN","ACCESS_SECRET");
after log in to Twitter, you can use Twitter APIs.
// tweet API example.TwitterAPI.Post("https://api.twitter.com/1.1/statuses/update.json",newSortedDictionary<string,string>{{"status","#LoveToriki. "}}, result=>{Debug.Log("update result:"+result);},(code,errors)=>{Debug.Log("update code:"+code);});
About
Unity Twitter Login/API kit.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published