Is it possible to derive a linkedin profile url (public OR private) from the user ID?
You can use the ID in this URL and this will give you the link to User Profile http://www.linkedin.com/profile/view?id=YourID
UPDATE: Apparently, this solution no longer works.
You need to get r_basicprofile permissions from the user, then grab the public-profile-url field from the response.
read more at https://developer.linkedin.com/docs/fields/basic-profile
I guess some things have changed in the LinkedIn API over the years.
This is the solution that worked for me:
http://www.linkedin.com/in/USERNAME
Used it as a href in my website to link to user's LinkedIn profile page and it works fine.
Related
I want to show my facebook page's like on my WordPress website. In my theme option, there is a option for access token key for my facebook page. How can I get my access token key for my facebook page?
Go to https://developers.facebook.com/tools/explorer/
Then Choose Page Access Token from Get Token
It will show the list of pages you manage.
Choose your desired page to get the access token key.
It works like a charm for me.
If I have a friends Linkedin User Name, how can I get his UserId using the Linked-In Developer APIs ?
For instance if my friends linkedin public URL is https://www.linkedin.com/in/XXX-XXX-c802146 the username is XXX-XXX-c802146. So now I need to get the User Id of this user. How can I get this ?
If you have the user's actual profile URL, just go to the page source and do a text search for li:member: and you should spot references to the actual profile ID. This worked for my purposes.
What I want to do is use the LinkedIn API to access a arbitrary user profile, get the image (if there is a public one) and use that image. If a user is authenticated, I can get their image using:
https://api.linkedin.com/v1/people/~:(picture-url)?format=json
But I cannot figure out what to replace the tilda (~) with to find an arbitrary user (i.e. using an email address). If I simply put in the email address, it won't find the user.
Is it possible to get info from an arbitrary user profile (assuming that it is public)?
Thanks,
Scott
It is not possible getting an arbitrary user informations by using LinkedIn API. The user must authenticate the application by his or her username and password.
However, this answer gives a working example how to access a profile by url. I suppose that adding picture-url will work.
I am implementing Facebook login on my website. I am creating an asp.net user as well with the Facebook users details. This way I can control login in people to my site using .NET membership regardless of whether they are a Facebook user or not.
The problem I am facing now is security. When a user logs in with Facebook I am calling a webservice with their facebook details, if the user exists on the system (by their facebook userid) then I log them in. However as it stands anyone could call the webservice with someone elses facebook id and it would log them in (if that user existed on the system). Is there something that I can use to link the facebook user with my asp.net user that is only accessible to that user, such as an access token. It also needs to be something which does not change? Does facebook send back such a thing in the response object?
Any help or suggestions are much appreciated.
Thanks
Yes, we can get that profile data from Facebook. Using that requestAccessToken Url you can get that access token.
requestAccessTokenurl="https://graph.facebook.com/oauth/access_token?client_id={0} redirect_uri={1};client_secret={2};code={3}"
Also we can get the Profile Data using this access token
requestProfileUrl="https://graph.facebook.com/me"
please see this link- http://easyoauth.codeplex.com/
you can download the source code also :)
We have implemented for Facebook, Twitter, LinkedIn, Google using this framework. It is very straight forward. I can help you how to do this.
Thanks
There are some question on the StackOverflow about facebook & email, but after reading them I still have a problem with retrieving users emails.
Our app implemented on Flex and uses REST API. And previously it used notifications.sendEmail.
App has publish_stream and email permissions (checked with users.hasAppPermission).
I tried users.getInfo for get proxied_email address.
But this function does not return email address of the friend..
Then I performed the following test using Graph API and web browser:
Opened the following link for authorization with extended permissions:
https://graph.facebook.com/oauth/authorize?client_id=[app_id]&scope=publish_stream,offline_access,email&redirect_uri=http://www.facebook.com/connect/login_success.html
It returned code for retrieving access_token
Oppened the following link for retrieving access_token
graph.facebook.com/oauth/access_token?client_id=[app_id]&client_secret=[secret]&code=[code]&redirect_uri=http://www.facebook.com/connect/login_success.html
It returned access_token. And now I can use GraphAPI.
Tested with my account
graph.facebook.com/me?access_token=[token]
Ok. It returned my emal.
Tested with my friend
graph.facebook.com/[friend_id]?access_token=[token]
And here is no email field!
So my questions are
Where did I go wrong?
Is it possible to get friend's email via Facebook API (GraphAPI or REST API)?
Thanks.
Email permission gives access to your email only.
If you look at the extended permissions page it says:
Likewise, to protect the privacy of users who have not explicitly authorized your application, your application will only be able to access the basic profile information about a user's friends, like their names and profile pictures. If your application needs to access other data about a user's friends to enable social functionality, you will need to request some of the special friends permissions listed below.
And if you look at the table below, it says "not available" for email permission for friends.
there ought to be some way else how does JanRain does it?
http://www.janrain.com/products/engage/invite-friends
I think that getting friends' email ids is not permitted by Facebook; at least, that's what my research tells me.
#helloworld: Who told you that janrain gets users' friends' email ids?
Only with the extended permission you can specify via the scope attribute, when obtaining the access token
Example:
https://graph.facebook.com/oauth/authorize?
client_id=...&
redirect_uri=http://www.example.com/callback&
scope=email