Downloading a LinkedIn Users CV using the LinkedIn REST Profile API - php

I am wondering if it is possible to make a call to the LinkedIn API using PHP that will allow me to GET the users uploaded CV.
Currently I'm working on some basic API calls that have enabled me to gather information relating to the users contact details, personal details, experience and all of the other fields in their profile. I just cannot seem to find anything within the Developers Docs that talk about retrieving the likes of a CV if it has been uploaded to their account.
https://developer.linkedin.com/documents/profile-fields
I'm wondering if any one has any experience doing something similar? Or if it is even feasible! Of course one possible solution would be to utilize the information I can retrieve from LinkedIn to construct a CV but Ideally I'd prefer to retrieve the document.
My hopes is to create an "Apply Now" button that would pre-populate the application form with user information from LinkedIn. When they click "Apply" It is then emailed to my company HR dept.
An overview of my Basic Attempt at utilizing the API: *having trouble copying my code into the editor here. Will attempt to do so later. For now here is my steps.
Attempt to authenticate my application as follows:
Apply Now
Redirect User to Redirect URL and request an Access Token which I then use to make my API Calls.
I just cant figure out how I might get their CV in whatever format it was uploaded to their LinkedIn Profile.

Users dont upload CV to linkedIn. They fill in their profile. What you should be doing, is, after you get the access token, get the user's profile, and fill in your form with relevant fields.
This can be helpful: https://developer.linkedin.com/documents/profile-fields#fullprofile
You would need r_fullprofile permission.
If you dont need the full profile of the user, see this. https://developer.linkedin.com/documents/profile-fields#profile

Related

How to get the "publish_post" equivalent

Scenario
I'm building an application that needs the ability to post to users wall (personal profile) on behalf of a user on facebook. I remember before the way that I would do it is request a permission "publish_actions" but reading through their documentation i came to this page:
https://developers.facebook.com/docs/graph-api/changelog/breaking-changes/#login-4-24
which states that that is being deprecated.
They recommended an alternative which is using their sharing product found here but this seems like it would break one of the functionalies of my current application (I dont want to share content i want users to post it to whenever they choose to on whichever account they choose to).
Question
Is there a way to get posting to a users wall and NOT an event, page or group. If i'm correct I can still post data to events, pages and groups via API as normal but to a users wall its different? I need to post on their wall via api but i can't seem to find the permission.
My facebook api graph version for my app is 3.0 and im using their PHP SDK to make the requests.

How to extract the profile picture of some user from facebook or instagram and upload it to profile page of that user at our website??

I am building a website using backend language as PHP.I am using MySql as database.So in my site we have usual registration system where any user can register him/her self.And then we ask to him to complete his/her profile on his/her profile page.
Okk so on profile page there are so many details about the user(like Date of birth,About his/her self, About his/her education, About his/her gender,Ethnicity,...etc) that we ask to fill.
One important attribute of the user profile is his/her profile picture.So user can upload his/her profile picture on his/her profile page.
But we want to give user 3 options :
1.He/she can upload picture from own computer/phone
2.He/she can upload picture from own facebook profile
3.He/she can upload picture from own instagram profile
I have implemented the 1st option sucessfully and it is working correctly.But i have no idea about how to implement other 2 choices?
I have googled quite about this but i could not able to understand how this can be done i a easy approaching way?
I am not so proficient in PHP , so please help someone.
Thanks in advance.
So this is a multi part question with a number of factors, unfortunately I won't be able to give you a sample code you can copy and paste but I can hopefully point you in the direction where based on your configuration you know how to proceed.
The first thing you need to ask yourself is if you want to connect over OAuth so all the user has to do is login to facebook and you can get the content of information you'd like or get the FacebookID from the user (or an automated process if they provide the profile URL) and link directly to the image. You can using the Graph API to get to a users picture using the FacebookID like you can see below.
http://graph.facebook.com/" + facebookId + "/picture?type=square
For instance:
http://graph.facebook.com/67563683055/picture?type=square
There are also more sizes besides "square". See the docs.
You need to use OAuth you get the FacebookID of the person unless they provide you the id or url to their page.
As per my understanding you can use the graph API
Graph API
Replace userid_here with id of the user you want to get the photo of.
You can use the PHP's file_get_contents function to read that URL and process the retrieved data

Uploading videos to a specific PREDETERMINED account with YouTube API v3

I have a website on which clients will be uploading videos. The thing is - I want those videos to be uploaded to OUR channel, not users' channels. I don't see how I could make it work using YouTube API v3.
Every time a person wants to upload something using the access token I provided he has to input his own credentials. He can't simply upload anything directly to OUR channel.
Is there a way to work that around?
Short answer is: You should not ask your users to upload into your account.
But please read further:
https://stackoverflow.com/a/12626209/1973552
https://stackoverflow.com/a/15258781/1973552
Api V2 have option you've mentioned. Did you try it?
Basically you want to let Users upload Videos in your website, but upload them directly to youtube, without Google AUTH?
Yes you can. Make sure you set the setAccessType to offline.
$client->setAccessType("offline");
This will make it so you get a refresh Token with the users account authentication the first time. A refresh token allows you to reauthenticate without the user being present. (aka, offline). Create your script from the sample API v3 scripts, authorize your main account (the one you want to be predetermined) and display the response. Something like the following will show you your response:
print_r($client->getAccessToken());
You will see your refresh Token in the json response. Save that (either to a database, or hard code it into the script). Now that you have a refresh token, whenever you want to upload to youtube, just call
$client->refreshToken($THE_REFRESH_TOKEN_YOU_SAVED);
$thetoken = $client->getAccessToken();
$client->setAccessToken($thetoken);
After this, your previously authenticated account will now be currently logged into your script.
FYI, these are php examples, you might need to adjust accordingly.

Sign in with fb or twitter

For a project I am working on, I think having the functionality to sign in with facebook/ twitter would be beneficial.
I have some design theory to iron out.
When the user first logs into the website using either twitter or facebook, I'll get their email and other relevant information and store it in the database where a normal signed up user would be stored.
When they return, they would log in with twitter/ fb again and it would locate the information in the database and not add it again.
If anyone tried to sign up with the email address provided by either of these services, an email would be sent to the email address to confirm it is them and then they could generate just a password to allow them to log in with information already stored.
I could they link other data on the website to the userid I have stored for them throughout the entire process.
So my query would be whether this is the correct way to go about this?
How have others used these types of login api's and then binded them to on site data?
I believe this to be a reasonable question but if I have placed it in the wrong section, please feel free to move it!
Thanks.
well, everything should be written here http://developers.facebook.com/ also try using php sdk for facebook api, for twitter here https://dev.twitter.com/
Create an app in both fb and twitter, take the access token and access token secret
You should download all the files necessary and then configure them as is written in manual, if you will have trouble connecting to them write me a message to my mail(jurijs.nesterovs#inbox.lv) i'll try to help
Have done that before myself for my site. It was Fb/Twitter/Google. I bet thats the best thing to do. Google's API is the easiest out of these 3. Twitter was hard for me since I dont use OOP and all the libraries out there was OOP.
And about your design, my site was made not to not allow the user to join with the same email again. If they have joined using Facebook with an email, when they try to join using twitter with the same email, I would tell the user that they are already registered using Facebook.

Get facebook posts/events/news/gallery with javascript (or php) inside my website

I'm tryin to develop a (almost) 100% client-side dynamic website by integrating it with twitter, facebook and flickr.
I've been able so far to get the last 4 tweets (with javascript) from my client's feed, and now i was wandering if i could do the same with facebook's gallery and events from their feed.
Especially, what i need (given the facebook username/api key/whatever)
gallery
for each gallery in user's profile:
get the gallery name
get the first picture
get the gallery url
news/events
for each news/event/post in user's profile:
get the event name
get the event text
get the event picture (if provided)
get the event url
I don't want to use the facebook widgets with their rendering, i just need to read the json response (if there's any) and put the data inside my website (like a preview).
Since my client is pretty rusty with "computers (cit.)" but he's (not so strangely) comfortable with facebook/twitter/flickr, i tought about a solution like this before adding a database and an admin interface to our website.
I found some resources online, so i think it's possible (in a way or another). I'd like to do it in javascript, but if it's php i won't complain.
Check out this API to get photoes from the user profile
http://developers.facebook.com/docs/reference/api/album/
This is for events
http://developers.facebook.com/docs/reference/api/event/
You can use either the PHP or the Javascript API SDKs:
http://developers.facebook.com/docs/reference/php/
http://developers.facebook.com/docs/reference/javascript/
respectively. Naturally you would handle the returned information differently. Both have a method called api() which can be utilised to grab the album and event objects (as mentioned in another answer):
http://developers.facebook.com/docs/reference/api/album/
http://developers.facebook.com/docs/reference/api/event/
You can pass parameters in the methods to restrict the results returned by fields, number of items, sizes of images etc. This is outlined here:
http://developers.facebook.com/docs/reference/api/
But the issues you are going to face is that you have to authorise your "app" - think website when they use the terminology "app" - to give it permissions to access the information. This takes the form of a two step process. You have to create the app on the Facebook platform which can then access the API methods (only certain information can be got from the API methods without an authenticated app).
The second part is that the user themselves must then authenticate their facebook account against your app - this gives your app permission to access the user's information. In plain English it would go like this:
User visits your webpage; user must be logged into Facebook and must approve your app (this used to be called Facebook Connect for obvious reasons); the app and the user account are "connected"; the app can then use the api methods you've written to return information about the connected user
The beginning explanations of how to do this are here:
http://developers.facebook.com/docs/authentication/
The only way you can access a user's (non-public) information from outside of Facebook is via a connected app and user profile.

Categories