- No wire No fire : Google unveils $60 Nexus 4 wireless charger
- Karbonn A30 SmartPhone with 5.9 inch screen, 8 MP Camera Launched
- Videocon 7-inch VT71 tablet with Android 4.0 for Rs. 4,799(Specification and Price)
- How to Speed Up the Computer and its Performance
- “SpaceTop 3D” transparent computer unveiled at TED 2013
Google plus and Facebook are two Giants of Social networks, Facebook Twitters already have their sign in option for websites, previously Google allow us to sign in with Google accounts which is quite similar, but Now you can sign in with your Google plus account, its indirect sign in to your Google account, By Google Plus Sign in you can access the user information like Profile, circles posts by users and other Google plus Features on your website.
To create your first Sample Google Plus Sign in website you need to create application for your Project.
Visit this url
Create new Project
Give the appropriate name for your Project.
Add the Homepage URL of your website on which you are going to use this Sign in feature, add the Product name which Users will see when they sign into your website with Google Plus, Logo is optional for branding.
Now Your application has been created now you have to create Oauth Client ID, Click on the button as you can see in the below Image.
Select the Type of your application, I am creating a web application so I am choosing web application.
Now Copy the Product name, CLIENT ID, CLIENT SECRET you need them to run the sign in process under your created project.
I am using the same sample application which is given by Google, You can Download the Sample Application from Here.
This sample application has all the required DLL files for the project so you don’t need to add any additional API DLL for your project.
In signin.ashx.cs file find the following code and add your CLIENT ID, CLIENT SECRET and APPLICATION NAME
// These come from the APIs console:
static public string CLIENT_ID = “Your Cliend ID“;
static public string CLIENT_SECRET = “Your Client Secret“;
// Configuration that you probably don’t need to change.
static public string APP_NAME = “Your Project Name“;
// Used internally by the OAuth client
private IAuthorizationState _authState;
// Used to peform API calls against Google+.
private PlusService ps = null;
Again in Index.HTML change the CLIENT ID with Your Client ID
data-clientId=”Your CLIENT ID here”
Now You can run the Project by pressing F5 from your Visual Studio, it will run the Index.html file, there you will see the sign in with Google plus button click the button, and you will see the popup for the Google plus authentication, then you can sign in to your website with the Google Plus, in return this sample application will give you the Profile Picture, profile information, Name and other Details you can check the Documentation from Google for more Information regarding the Google plus with Asp.net.
This is the very new feature, subscribe to get more alerts on Google plus with Asp.net.