Get the username from a linkedin REST API call - rest

I'm using linkedin's Oauth2 stuff to authenticate and incorporate users info on a site I'm working on. I'd like to be able to use the REST API and using the querystring /people/~:(id,site-standard-profile-request) etc[assuming the person with an answer knows the API], to be able to get the user's linkedin username.
The reason I want this is so that I can use a link to view the users profile like this: linkedin.com/in/(username)
The /in/ works for both logged in and non-logged in viewers which is amazing for developers that like simple easy ways of doing things.
I hope that someone out there at least has an answer. I cannot find anything along the lines of 'username' in their API documentation. They might not offer it through this service, but it can't hurt to ask.

I am not aware of a username field offered via the Linkedin People API. The default response from http://api.linkedin.com/v1/people/~ will return a site-standard-profile-request/url. So that will get the logged in users profile url, or substituting the tilde with a id will retrieve somebody elses profile url. Using this url will accomplish the same thing as what your after.

Related

Information about Facebook logins and unique pages

I need to learn how to implement login into a website but I've heard that I shouldn't make a custom script unless I really know what I'm doing.
A better alternative I've hard is to just use Facebook login. I've looked over the docs but I'm still confused on something. I want to store additional information about the user (not just their facebook profile information) and I need to use that information to generate unique pages when they're logged in.
I am also wondering if the additional information I save about them will be just as secure as their facebook information or if it will be more vunerable.
If someone could guide me in the right direction with direct answers or useful articles I would very much appreciate it.
Read through the docs for login with Facebook and try out the sample code provided. That will give you a clear idea how to integrate Facebook login in your website.
In order to integrate login with Facebook you will first require an app id which is quite simple to create. Once you have the FB app id, you can integrate the login bit. Once the user successfully logs in, you should get back an app-scoped user id and as suggested by Lix use that as the primary key. Also, after user logs in, you can may be present a form where you collect additional data and save that against the user id in the database.
Regarding the security of the information, it really depends how and where you store it.

Is there API to get someone's facebook profile with out login to facebook?

I was wondering if its possible to get one's facebook profile (to be exact,'profile url') through their API?
I need an api to get fb profile link using a matching email address. I dont want to login to facebook though.I was trying to search for this but it seems you need to log in to facebook to get that.
Any idea or is it feasible?
You need ID of the concerned user which can't be achieved without using the Facebook Login, since Facebook login is the starting point to get the current user info (/me).
Search API could have helped you since you have the email ids of users, but unfortunately this api doesn't support user search with email!
So, answer is simple- NO, you cannot get the ID (profile link) of the user without using the facebook login.
Not that I can think of. Facebook's Graph API gives you some public info but that info given depends on the users Facebook's settings on what is public or not. You could maybe get some users profile picture but not others, making it not a very viable option for practical use. Hope that helps

facebook API permissions

Just starting out with Facebook's API. I have a client that sends me the access_token after logging into to FB on iPhone. I am wondering where I would specify the permissions I need, for example to access email, or user's music data?
Is it via client using FBSession, or via Koala (ruby gem I use on server side with access_token to get user's info) or in Facebook's app settings page?
Thanks
If your user is logging in via an iOS app, you need to request them in the permissions parameter of FBSession. https://developers.facebook.com/docs/reference/ios/3.1/class/FBSession#permissions
Although I'm not a specialist in mobile development, so I cannot provide you with a functional example (or even properly explain how to do this) I have done a bit of browsing in the Facebook API section of the Developers website, and I believe that I have the answer to your questions. This will not only answer where, but it should also give you how, for many different purposes, there are different permissions that you must add, and this page gives you some idea of how to do all of them.
http://developers.facebook.com/docs/reference/login/

Get users Facebook ID for database

I need the following, any help would be much appreciated.
I Have a registration form.
It inputs the data Name | ID | DOB | TWITTER | FBID
When the user registers it asks for the above values.
Twitter is easy as users can just put in their Twitter ID.
But I Need to get the users Facebook ID in the form.
What would be the best way to do this?
Could i use the 'Connect To Facebook" Feature.
All i need is the Facebook user ID so that i can use it when retiring graph data later on.
I have set up a Facebook Application and am using PHP with a MySQL database.
Thanks
Alex
Well, they have specific APIs for different functions. In your case none of their simple solutions work. You will probably need to use Facebook's Graph API. You should take a look in their PHP SDK. It is a very useful tool. I used it once and it worked perfectly.
You will need to know much, before you get the users is. Also if you want to make that automatically, they will have to be logged in and they will have to confirm access to their personal data from your facebook app.
Good luck!
For any user data you wll need to get permission from user.
You can use Facebook connect.
Make the user log in and get access token, this access token is the key to all user data.
You can use this access token with graph API also.
Check my blog.

Anyone know of a good tutorial for Facebook authentication?

I'm linking my app to Facebook, and would like people to log in with their Facebook account, but I can't figure out how to do this. I had read up on Facebook Connect, but it seems that that's not used any more - but every tutorial I can find seems to refer to it. When I try to follow them, it doesn't work, because the interface has changed.
So, can anyone direct me to a tutorial or guide to doing this the new way?
Basically, what I want to do is this:
A user who is signed into Facebook and comes to my webpage is automatically logged in to my app (with the usual Facebook 'granting permission' windows etc), or can sign in with their Facebook account if they're not already logged in.
I then want to use Facebook to link users with their friends who are also registered on my site, so they can share things.
I would also like to have access to Facebook comments made on wall posts from my site - so the comment stream for a particular post can be seen on my site as well as on Facebook, and comments can be made on either.
If anyone can point me in the right direction (or even tell me what I should be typing in to Google!) I'd be very grateful.
Thanks.
Some sample apps that do many of the things you speak of are shown here. The Graph API is probably your best bet right now for delivering the content and access you need and there are numerous tutorials online for how to use it, including the Facebook Developers site itself.
You will find good Tuts on ThinkDiff, e.g.
http://thinkdiff.net/facebook/new-javascript-sdk-oauth-2-0-based-fbconnect-tutorial/
http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/
http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development-php-sdk-3-0/
I know this is an older question, but the current method for authentication is OAuth 2.0.
Facebook provides a pretty good outline of what steps are necessary in this Reference:
https://developers.facebook.com/docs/authentication/client-side/
This example allows the authentication to occur entirely in Javascript on the client side so that you can request a potential user to authenticate via Facebook and then confirm access to your application.
If the user is already logged in, only the access confirmation for your application is performed.
If the user is already logged in and access has already been granted, the user is not required to login, or reconfirm access.