-
Sgacheru
-
Anonymous
-
Adrian
-
Anonymous
-
http://twitter.com/bikt87 bikt87
-
pawan damase
-
Anonymous
-
Danoski74
-
http://bobbelderbos.com/ Bob Belderbos
-
Scott Rowley
-
Scott Rowley
-
http://bobbelderbos.com/ Bob Belderbos
-
http://bobbelderbos.com/ Bob Belderbos
my facebook
my skype




Twitter API: tweet with PHP
Today’s web is about sharing. My facebook API / movie experiment Sharemovi.es is up and running. It needs some tweaking but bit by bit.. What I did find important was a live stream. Of course you can go the old-school route of mail updates, but today updates are more efficient via facebook and twitter.
As I played already with the facebook API, today it was time to do some research on Twitter’s API. Purpose: push new movie reviews to twitter! This way people can follow sharemovies and they get new movies automatically pushed into their stream. (Updates on the app are however posted to facebook via the activity stream)
There are some tutorials that suggest this method:
if (empty($buffer)) {} else {So I followed this helpful article:
1. Register an app: http://dev.twitter.com/apps/new. This is quite common; Facebook asks the same.
You need the read & write permissions to post to your twitter account
2. You get 4 API keys. Download the Abraham Twitter OAuth class to connect to twitter using OAuth and fill in the keys.
3. including “OAuth.php” and “twitteroauth.php” the rest is easy
File tweet.php
require_once('twitteroauth.php'); // twitteroauth.php points to OAuth.php // all files are in the same dirThis makes the twitter instance which you can use to post updates to your stream (the user account that registers the app, is used to post the updates to!) :
$tweet->post('statuses/update', array('status' => $statusMessage));So when adding this bit of code at the point where somebody adds a movie, it posts the new title + URL to the @sharemovies twitter account. Following this user and you get updated about new movies in your twitter stream :)
Create your Movie stream with twitter API
I probably deploy the same with Facebook over time, but it is always good to play with various technologies.
==
If you like this article, please share it to Facebook or Twitter with the corresponding buttons at the top and bottom of this article ..
You might also like:
Enjoyed this article?