In a previous article we took an initial look at how a business-oriented community website can benefit from integrating with LinkedIn.com, outlining the steps necessary to utilize the LinkedIn API and OAuth to do this. Now we’ll look more deeply at the achievement of integration and the ability to allow your users to invite LinkedIn members directly to your website. The library that we are using and that we referred to in our previous artcle, is this one.
So, again, this integration task consists of two parts: first, the user must search for a friend whom they wish to invite to your site and then the invitation must be sent.
1. The search function is outlined very well in the LinkedIn API documentation so we’ll skip here directly to a simple example in order to highlight the most important features:
//searching of all friends named Ann $search_response = $linkedin->search("?facets=network&facet=network,F&first-name=Ann"); $xml = simplexml_load_string($search_response); foreach($xml->people->person as $person) { print_r($person); }
Take special note:
- All parameters of a search inquiry are connected with logical AND.
2. Unfortunately LinkedIn does not allow us to detect the email address of a user but invitations can be sent via LinkedIn’s on-site messaging system. While the API will allow us to send on-site messages, the feature is not implemented in the linkedin.php library which we’ve loaded and so we’ll need to modify a bit. Add this code into the file linkedin.php:
- WildCard is not supported.
- If a search returns too many results you are able to narrow them done using the “total” parameter in the returned XML:
base_url . "/v1/people/~/mailbox"; $request = OAuthRequest::from_consumer_and_token($this->consumer, $this->access_token, "POST", $send_url); $request->sign_request($this->signature_method, $this->consumer, $this->access_token); $auth_header = $request->to_header("https://api.linkedin.com"); if ($this->debug) { echo $request->get_signature_base_string() . "\n"; echo $auth_header . "\n"; } $raw_xml = " $subj $msg "; $status = 0; $response = $this->httpRequest($send_url, $auth_header, "POST", $raw_xml, $status); return $status; } ?>
Now the code to send the message will look like this:
//$id_rec - id recipient in LinkedIn. $send_response = $linkedin->sendMessage($id_rec, 'Subject', 'Message body'); if($send_response == 201) { //Message sended } else { //Error handling }
I am developing a blog and and i want to change the theme.Yours looks pretty decent! You could visit my website and tell me your opinion!
The most difficult thing is to find a blog with unique and fresh content but your posts are not alike. Bravo.
I will post a link to this page on my blog.
Thanks!
Hello Im Richard ,Have been a tea fanatic, really like the aroma and the taste of tea as the primary thing after waking up. I drink atleast eight cups every single day. By the way nice blog, Have a nice day.
I keep listening to the news update lecture about receiving boundless online grant applications i really happen to be shopping for the top site to get one. Could you advise me please, where could i buy some?
I dont completely get the hang of your view, but I get the point.
There is noticeably a bunch to identify about this. I consider you made some good points in features also.
You are a very capable person!
There is obviously a bundle to identify about this. I assume you made various good points in features also.
Dude! This blog is amazing.
I noticed something as well about this on different blog.Interesting, your view on it is diametrically opposite to what I read before. I am still trying to figure out over the conflicting points of view, but I’m tipped heavily toward your point of view. And in any case, that’s what is so splendid about contemporary democracy and the marketplace of thoughts on-line.
You made some decent points there. I did a search on the topic and found most people will approve with your website.
I really love reading your blog, it is actually one of the highlights of my week. I particularly enjoy reading it during my lunch break.
i’m adding your blog’s rss feed so that I can see your new posts. Keep up the good work!
I don’t even know how I ended up here, but I thought this post was interesting. Cheers!
Hi there! This is my first comment here so I just wanted to give a quick shout out and tell you I really enjoy reading through your articles. Can you suggest any other blogs/websites/forums that cover the same topics? Thanks a lot!
I wanted to thank you for this interesting I definitely loved every little bit of it. I have you bookmarked your web site to check out the latest stuff you post.
Admiring the commitment you put into your blog and detailed information you present. It’s good to come across a blog every once in a while that isn’t the same unwanted rehashed material. Wonderful read! I’ve bookmarked your site and I’m adding your RSS feeds to my Google account.
Wow this is a great resource.. I’m enjoying it.. good article
I want to convey my passion for your kind-heartedness for people that really want assistance with this question. Your real dedication to getting the message up and down ended up being certainly insightful and have in every case helped ladies much like me to realize their pursuits. Your amazing valuable guide indicates a lot to me and further more to my peers. Best wishes; from each one of us.
I be subjected to winding up vanquish to your blog innumerable times. The added articles are incredibly captivating and interesting. I unswerving to signup payment your rss grant-in-aid, so I can secure keeping in the departmentalize of your concomitant editorials.
WONDERFUL Post.thanks for share..extra wait .. …
This really answered my problem, thank you!
I truly like the fresh perpective you did on the problem. Truly was not expecting that when I started off studying. Your concepts were easy to comprehend that I wondered why I never looked at it before. Glad to know that there’s an individual out there that definitely understands what he’s discussing. Fantastic job
*When I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service? Thanks!
we will go back to the 1990s where you had to pay for each byte downloaded.
So where are all these jobs that the cuts are supposed to create? Are the millionaires spending their current extra 3% to create jobs
Top post. I look forward to reading more. Cheers – 30000
Its such as you learn my mind! You seem to understand a lot about this, like you wrote the book in it or something. I believe that you simply can do with some % to drive the message home a little bit, but instead of that, that is excellent blog. A fantastic read. I’ll certainly be back.
Your place is valueble for me. Thanks!
Excellent article and easy to understand explanation. How do I go about getting permission to post part of the article in my upcoming news letter? Giving proper credit to you the author and link to the site would not be a problem.
I am Glad i came across this blog.Added it to my bookmark!
Thanks for sharing!!!
As a fellow professional from the fashion marketplace, I found your internet web site to be educational. I’ve usually been in value with trend all my lifestyle so I’ve produced a forum for marketplace experts to come collectively and discuss all issues trend. I’ve gained a couple great suggestions for my world-wide-web web page from studying this
Smart stuff, I look forward to reading even more.
i’ve visited this cool site a few times now and i have to tell you that i find it quite nice actually. continue doing what you’re doing!
added this to digg
Pingback: Alexander1
Pingback: Alexander6
Pingback: Alexander7
Pingback: STEVEN
Pingback: LEWIS
Pingback: ENRIQUE
Pingback: EDUARDO
Pingback: TERRENCE
Pingback: SALVADOR
Pingback: RONNIE
Pingback: ROY
Pingback: PERRY
Pingback: DUSTIN
Pingback: BRANDON
Pingback: RICARDO
Pingback: TRACY
Pingback: RUSSELL
Pingback: SALVADOR
Pingback: WALLACE
Pingback: ARTHUR
Pingback: GABRIEL
Pingback: FRANKLIN
Pingback: LESLIE
Pingback: GUY
Pingback: JEFFREY
Pingback: DONALD
Pingback: ALFRED
Pingback: GARY
Pingback: FELIX
Pingback: WILLIE
Pingback: LESLIE
Pingback: TERRENCE
Pingback: BYRON
Pingback: SAM
Pingback: RUBEN
Pingback: BOB
Pingback: BILLY
Pingback: NATHAN
Pingback: TED
Pingback: CARL
Pingback: ANGELO
Pingback: RICARDO
Pingback: BRUCE
Pingback: ADAM
Pingback: OLIVER
Pingback: LLOYD
Pingback: LUIS
Pingback: CLIFTON
Pingback: RAY
Pingback: BERNARD
Pingback: LAWRENCE
Pingback: VICTOR
Pingback: DARYL
Pingback: RODNEY
Pingback: SERGIO
Pingback: JEREMIAH
Pingback: MELVIN
Pingback: BRUCE
Pingback: MARION
Pingback: JOEL
Pingback: MITCHELL
Pingback: JERRY
Pingback: BRETT
Pingback: GLENN
Pingback: STEVEN
Pingback: MARION
Pingback: BRYAN
Pingback: JOHNNY
Pingback: LEWIS
Pingback: VINCENT
Pingback: MARVIN
Pingback: BRUCE
Pingback: EVAN
Pingback: VINCENT
Pingback: LEROY
Pingback: MILTON
Pingback: LOUIS
Pingback: CARLOS
Pingback: ALEX
Pingback: AARON
Pingback: NICHOLAS
Pingback: SHANE
Pingback: DWAYNE
Pingback: ALVIN
Pingback: NICK
Pingback: JASON
Pingback: RENE
Pingback: RANDY
Pingback: NATHAN
Pingback: ENRIQUE
Pingback: BRAD
Pingback: KIRK
Pingback: DARRYL
Pingback: MELVIN
Pingback: DEAN
Pingback: JOSE
Pingback: KEN
Pingback: RUBEN
Pingback: BARRY
Pingback: REX
Pingback: STEPHEN
Pingback: GENE
Pingback: CLINTON
Pingback: AUSTIN
Pingback: RICHARD
Pingback: STEPHEN
Pingback: JOHNNY
Pingback: ALAN
Pingback: BOB
Pingback: gerard
Pingback: EVERETT
Pingback: JEFFERY
Pingback: TYLER
Pingback: JERRY
Pingback: JAMES
Pingback: MARION
Pingback: EDWIN
Pingback: EDWIN
Pingback: FREDDIE
Pingback: EUGENE
Pingback: TIMOTHY
Pingback: RAY
Pingback: RONNIE
Pingback: GREG
Pingback: ALBERT
Pingback: ZACHARY
Pingback: TRAVIS
Pingback: TODD
Pingback: ALAN
Pingback: MATT
Pingback: EDWIN
Pingback: CHRIS
Pingback: HERMAN
Pingback: ANTONIO
Pingback: PEDRO
Pingback: BRYAN
Pingback: LEO
Pingback: MARK
Pingback: TRAVIS
Pingback: HENRY
Pingback: DERRICK
Pingback: HUBERT
Pingback: LESLIE
Pingback: MILTON
Pingback: IVAN
Pingback: BARRY
Pingback: GORDON
Pingback: ZACHARY
Pingback: NATHAN
Pingback: ANDRE
Pingback: JOSHUA
Pingback: KEN
Pingback: HOMER
Pingback: CODY
Pingback: LAWRENCE
Pingback: JEFF
Pingback: WALTER
Pingback: KYLE
Pingback: PERRY
Pingback: BEN
Pingback: KENNY
Pingback: ALEX
Pingback: WALLACE
Pingback: TERRENCE
Pingback: DOUG
Pingback: PETER
Pingback: MARION
Pingback: PETER
Pingback: KIRK
Pingback: KYLE
Pingback: BRADLEY
Pingback: ERIC
Pingback: WARREN
Pingback: JOEY
Pingback: JEREMY
Pingback: BYRON
Pingback: RICARDO
Pingback: FREDRICK
Pingback: GUY
Pingback: CHRIS
Pingback: DALE
Pingback: ALEJANDRO
Pingback: CLIFTON
Pingback: THEODORE
Pingback: BRADLEY
Pingback: WILLIAM
Pingback: MICHAEL
Pingback: JEREMIAH
Pingback: NATHANIEL
Pingback: CHARLIE
Pingback: JIMMY
Pingback: BRANDON
Pingback: MICHEAL
Pingback: LESLIE
Pingback: FRANCIS
Pingback: ENRIQUE
Pingback: LUKE
Pingback: FRED
Pingback: LESTER
Pingback: DAN
Pingback: NATHAN
Pingback: STEVE
Pingback: ARTURO
Pingback: VICTOR
Pingback: STEVE
Pingback: OSCAR
Pingback: JIM
Pingback: JIM
Pingback: JORDAN
Pingback: JOHN
Pingback: GREGORY
Pingback: JOEL
Pingback: BRETT
Pingback: JEREMY
Pingback: HARRY