Reputation: 7325
I am looking for a simple script that I can use to send some text to Twitter, and Linked in.
The objective is to be able to have a simple sample PHP script that looks something like this:
<html>
<head>
<title>Twitter and Linked In API</title>
<script type="text/javascript" src="jquery.js">
</head>
<body>
<?php $dummy_txt = 'Hello world! from me'; ?>
<div id="tweet">Tweet</div>
<div id="sendto_li">Send to Linked In</div>
$(body).ready(function(){
$('#tweet').click(function(){
//post data to server
});
$('#sendto_li').click(function(){
//post data to server
});
});
</body>
</html>
//Server side
<?php
function tweet(){
}
function sendto_linkedin(){
}
?>
Cabn anyone help with writing the server side functions that will encapsulate the Twitter and LinkedIn API?
Upvotes: 2
Views: 863
Reputation: 4685
Twitter currently recommends tmhOAuth and we use it. It works well
Upvotes: 1
Reputation: 6612
For twitter have a look here for PHP script. php-twitter
I don't think LinkedIn has a public API but it has an API. You would need to contact them to get that information.
Upvotes: 0
Reputation: 85338
You need to use oAuth for Twitter and if it's your LinkedIn account you can link the two accounts to share the same feed. LinkedIn API link http://developer.linkedin.com/community/apis;jsessionid=0386306DE923BEFCB325BD1E9B6F7ABB.node0 Would need to request API Access
Upvotes: 0
Reputation: 17624
I'm not sure about how LinkedIn works, but for Twitter, either you have to use oAuth to post for the user or just use a link of this format:
<a href=”http://twitter.com/home?status=STATUS”>Tweet</a>
and then the user just has to post the status on twitter's site.
Upvotes: 0