I would like to login using my own account in conjunction with the LinkedInApi. The problem I have is that most examples I can see either use a cookie or login interface for local users login credentials. However my aim is to login with my own specific account by providing my username and password.
I can then extract the testimonials from my profile and display them on my website.
Is this possible? And if so do you have any examples of how this can be achieved?
After thinking about this for a considerable amount of time I realised that the answer is quite simple.
If you make the API call on the server side you can specify the credentials. For example in an MVC application you might make the call on the controller action method.
If you want to allow users to login using LinkedIn you should first create an app in LinkedIn from the below link
https://www.linkedin.com/developer/apps.
Then Add LinkedIn login button from this Url
https://developer.linkedin.com/docs/signin-with-linkedin
Below is the link you will find the complete solution.
http://www.c-sharpcorner.com/UploadFile/145c93/sign-up-users-using-linkedin-and-save-users-detail/
I am not promoting the article, just providing the link where you will get the complete solution.
Related
Use Case: I want to create a login button for "Login with Facebook". I want this functionality to be implemented using c# or asp.net with JavaScript or with JavaScript alone.
Requirements:
1) On the click of "Login with Facebook" button a pop up asking for email address should be visible.
2) When the user enter(s) the email address then a verification email is sent to the user.
3) When the user clicks on the "Verify" button in the email, then the user gets redirected to the Home page.
4) On the home page a pop appears asking user to provide permission to access the facebook details.
5) When the user finally allows it, it gets login from his facebook account.
Can anyone provide me a explanation for the above task? Any help will be greatly appreciated. Thanks in advance.
You should just use OAuth2 and follow the recommended process by facebook. Have a look at the documentation of the facebook graph API here.
Remember to create a facebook developer account here.
If youre using ASP.NET, there is an included Facebook OAuth2 client. Have a look at this link here. Its actually pretty easy to accomplish a simple facebook login and retrieve an access-token.
I know thats alot of links but you will have to first read a bit about the whole process to understand how it works.
Hope this helps and good luck.
I am using passport.js to let users log in.
I am wondering if it's possible to create a link to their profile on their social media account?
For instance, when logging in using Facebook, I can get an ID, but the link https://www.facebook.com/profile.php?id=__ID__ doesn't work.
Maybe it's not possible at all since some Facebook users might have their Facebook profile hidden even though they use their account as login for other websites.
From what i know, this is not possible using passport at least.
The reason why the link doesn't work is that the ID returned by Facebook is always app specific so different apps would get different IDs for the same user. So you don't get the "official" ID of a user which you could use for building the URL.
However, the Facebook API returns a link to a users timeline which should be the one you are looking for (https://developers.facebook.com/docs/graph-api/reference/user/). But from what i see in the documentation of passport, this information is not returned. So if you want to get the link you need to work with the Facebook API directly.
I have a simple web service and I want to add social login with Facebook and Google using Loopbackjs.
I've already done parts of this editing the example found at this link: https://github.com/strongloop/loopback-example-passport and following the instructions at this one: https://docs.strongloop.com/display/public/LB/Third-party+login+using+Passport.
My problem now is that I need to retrieve user information after login, so that every following editing request on the User model can be direct to the owning User entity.
e.g. The User X want to access to my application:
X request for "example_site_address/auth/facebook";
X will redirect to "www.facebook.com/dialog/oauth?response_type=code&redirect_uri=example_site_address/auth/facebook/callback&scope=email&client_id=XXXXXXX";
After his acceptation, he will redirect to "example_site_address/auth/facebook/callback&scope=email&client_id=XXXXXXX";
Then he will again redirect to "example_site_address/success_fb", this link should give to the client the User entity with which he is logged in.
Using Google this problem is solved because I could retrieve AccessToken information from the cookies, find the User who's owning that, and then send back it to the client, so he can store the UserId and every a following request could be like on this User.
Using Facebook I'm not able to do this, because cookies concern login are encrypted.
I'm a really beginner on this kind of application, so it is possible that my strategy is wrong. Could you help me to do this?
LoopBack Example is using a cookie-parser package (see server/server.js). Cookies are signed but you have an access to them via req.signedCookies property.
i have a project that have option to log in with facebook.
but this option only work for the admin of the site
whenever any other user want to log in the site a form will appear and ask some info. if full fill the form and click register it shows a error message.
Now i want to remove the form part from the website and want onclick login for all user. here is the link of the site
https://dev.metarank.com/
please help me to find the solution
thanks in advance
If I am not wrong to create a Facebook login button you need to create an app to obtain api keys, right?
If it is the case the problem could be the following:
After testing the login button you have to make the app publicly available by passing a review process from Facebook, and then anyone will be able to login to your website with a Facebook account.
As said: this is the process for standard apps, at the moment I am not sure at all about if it is exactly the same process for logins.
Quick questions, but can I display profile data from my own LinkedIn page on a website through the JavaScript SDK, without having the user login through the authentication layer ?
I don't want to display any other information other than from my profile, I was under the impression this is possible without a user logging in.
https://developer.linkedin.com/docs/js-sdk
I have connected correctly:
<script type="text/javascript" src="//platform.linkedin.com/in.js">
api_key: xxxXXXxxxXXXxxx
onLoad: linkedInLoaded
</script>
but then using the follow:
IN.API.Profile("me").fields([]);
Tells me I require authentication.
Hi #CHEWX I misunderstood your original question. Yes, you are correct, what you are trying to do is not possible. What are you looking for is the ability to make an unauthenticated call to pull any random profile (and for your use-case, you would always be pulling your own profile). However, LinkedIn does not have any unauthenticated APIs available.
The only thing that comes close to what you are looking for is a drop-in plugin which you can find here: https://developer.linkedin.com/plugins/member-profile
You could build some service that makes an authenticated REST call to pull your profile every so often, and then push the updated profile info to wherever you are saving it to display it on your website.