Sso I’ve been trying to get facebook and twitter login via oauth working in a simple webforms application with no success, there is virtually no usable documentation or tutorials online so i figured it would be time for me to show you the easiest 3 – 5 line authentication system you could implement in .net that supports facebook and twitter
Firstly you’ll need to open up NuGet Package Manager and find “Microsoft WebPages OAuth Library” install this and your ready to go
Head over to https://dev.twitter.com/ and https://developers.facebook.com/ to register your application both websites will provide you with an Application ID and a Secret Key once you have these proceed to setting up your application
Begin by adding a Global.asax file to your application and in Application_Start add the following replacing TwitterAppID, FacebookAppID with the AppID’s provided by each website and the same for TwitterSecretID and FacebookSecretID
'Copyright rm2kdev, free for use by anyone. Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) OAuthWebSecurity.RegisterTwitterClient("TwitterAppID", "TwitterAppSecretID") OAuthWebSecurity.RegisterFacebookClient("FacebookAppID", "FacebookAppSecretID") End Sub
Once you’ve done this create a login.aspx page and add two buttons “Login With Twitter” and “Login with Facebook” then under each button’s onclick event add this
'Copyright rm2kdev, free for use by anyone. Protected Sub btnTwitter_Click(sender As Object, e As EventArgs) Handles btnTwitter.Click OAuthWebSecurity.RequestAuthentication("twitter") End Sub Protected Sub btnFacebook_Click(sender As Object, e As EventArgs) Handles btnFacebook.Click OAuthWebSecurity.RequestAuthentication("facebook") End Sub
Now you’re almost ready to go the last step is simply to add in your page_load event of login.aspx something to handle what will happen when facebook or twitter returns a valid or invalid login so
'Copyright rm2kdev, free for use by anyone. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim LoginResult = OAuthWebSecurity.VerifyAuthentication If LoginResult.IsSuccessful = True Then Response.Write("Login Sucess : " & LoginResult.UserName & ", " & LoginResult.ProviderUserId & ", " & LoginResult.Provider) 'Do something here like store this information in a database or in the session to remember the active login End If End Sub
And voila ignoring the .net boilerplate in under 6 lines of code we have successfully implemented facebook and twitter oauth logins how you handle these is up to you now facebook and twitter will return you if the login is valid from here you could store that information in a database or setup a session giving the user access to whatever features of your website are restricted the LoginResult variable also holds “Provider” and “ProviderUserID” these are the unique identifiers that represent the users account on the providers website so if you were tracking users visits to the website or setting up an ecommerce sales platform you would store that with a link to “ProviderUserID” as this will be unique for each user and let you look back and see what information is stored against their account on your website later.
Yesterday YoYoGames CTO publicly released 2 APK files demonstrating the new LLVM compilation in game maker studio that should be coming in version 1.2.
But what does this actually mean for users of game maker? Lets first answer this question by defining what an LLVM is and why its better than a traditional Interpreter.
LLVM Stands for Low Level Virtual Machine and it can be thought about as a replacement for the traditional interpreter but why replace something that’s all ready working? An interpreter just like in real life stands between two platforms, the Source Speaker (GML) and the Destination Platform(PC, Mac, Linux) interpreting what the source is trying to say into actions the destination can perform.
A perfect example of this would be a Chinese man speaking to an interpreter to ask an English man to fetch him some coffee while this process works it is not an ideal situation.
In order for this to work the interpreter needs to speak fluent English and Chinese and in the same way the GML Interpreter needs to know every function of gml and be able to translate that into an appropriate function of any other platform this means the interpreter becomes heavy with knowledge and holds onto information about everything possible in gml even when its not required.
The LLVM solves this problem by eliminating the middle man directly compiling the language to common language “CL” this common language is then compiled directly to the platform in question this gives us a huge performance gain over interpretive systems since we no longer have a middle man this also makes it significantly easier to take the language to different platforms since no longer do we need to port the interpreter to a new platform but instead simply add support for the common language which in many cases is already done.
The LLVM handles code optimization and generation at a low level this means no longer are functions compiled into your applications that your applications don’t use which allows for a smaller footprint since we no longer have the entire GML Interpreter built into the application but only a subset of whats being used.
You can quickly begin to see the benefits of an LLVM system over the traditional interpretive system and we should be expecting to see a realistic performance increase in application logic of over 2x and of course small footprints.
You can find the demo apk’s and the post by YOYO’s CTO Below
This is a collection of my thoughts… raw and unedited after watching this you will come out a better developer i promise. I go over how to teach yourself to think for yourself how to solve your own problems and not get stuck while your developing.
I try my hardest to explain how to free yourself from the limitations of ‘what you know’ and become a problem solving developer who can make anything.
The video is structured as follows:
My introduction and ramblings
00:00 – Greetings
01:05 – Developing Tile Consistency
03:35 – The Best Advice Ever
04:53 – How to Learn
Examples and lessons
09:00 – Breaking Down 2D Collisions
13:03 – Breaking Down Monster AI
15:50 – Breaking Down Monster AI Part 2
17:05 – Breaking Down Attack Mechanics
21:15 – My Experiences
24:00 – Judgement Calls
26:00 – Conclusions
Hi Guys, I’m going to write a few small articles and accompany them with some you tube videos. my focus here is going to be on things you can do to polish your games when you don’t have access to a talented artist.
Now please don’t go into this expecting to come out of it with Hollywood style polished graphics created by a team of commercial artists because quite simply you cant polish a turd but you can make it smell less bad 😛
Its mostly a collection of my thoughts and personal techniques but mostly i just want to share my process’s with you guys so people struggling with artwork can begin to have some level of quality in their games.
There’s a lot you can do with code to liven up a game and make it feel more polished without needing to invest in a professional artist.
sprite effects, easing on your movement, better physics, refining your controls etc. we will go over these techniques in the coming weeks.