OK, so I managed to get the most out of this work without API experience, etc.
Here is my walkthrough:
Step 1.
Create a Twitter List.
- Go to: https://twitter.com/username/lists
- Click Create List
- Enter the data and save.
- Go to the Twitter user you want to add to the list and click the drop-down list of programs and select "Add or remove from lists." Check the box next to your list.
Step 2.
Create a Twitter app via: https://dev.twitter.com/apps/new
- Log in using your Twitter credentials.
- Give your application a name, description, etc.
- "" " ", " Twitter".
- " " .
, , . .
3. API.
Abraham Twitter oAuth : https://github.com/abraham/twitteroauth ( "" ).
, authorise.php oAuth ( ). ( <? PHP ? > ).
require_once("twitteroauth/twitteroauth.php");
$oauth = new TwitterOAuth('Put-Consumer-Key-here', 'Put-Consumer-secret-here',
'Put-Access-Token-here', 'Put-Access-token-secret-here');
$credentials = $oauth->get("account/verify_credentials");
echo "Connected as @" . $credentials->screen_name;
$oauth->post('statuses/update', array('status' => "hello world"));
- API " " Twitter.
. /, , , API, , , . ( , ).
4.
PHP, .
- XML (YOUR-FILE-NAME.xml) oAuth.
- PHP (YOUR-PHP-FILE.php) oAuth
API- twitter, Twitter PHP. ( <? PHP ? > ).
$consumer_key = 'INSERT HERE';
$consumer_secret = 'INSERT HERE';
$access_token = 'INSERT HERE';
$access_token_secret = 'INSERT HERE';
require_once('twitteroauth/twitteroauth.php');
$oauth = new TwitterOAuth($consumer_key, $consumer_secret, $access_token, $access_token_secret);
$oauth->useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9';
$credentials = $oauth->get('account/verify_credentials');
echo 'Connected as @' . $credentials->screen_name . '\n';
$remaining = $oauth->get('account/rate_limit_status');
echo "Current API hits remaining: {$remaining->remaining_hits}.\n";
$ch = curl_init();
$file = fopen("YOUR-FILE-NAME.xml", "w+");
curl_setopt($ch, CURLOPT_URL,'https://api.twitter.com/1/lists/statuses.xml?slug=INSERT-LIST-NAME&owner_screen_name=INSERT-YOUR-TWITTER-USERNAME-HERE&include_entities=true');
curl_setopt($ch, CURLOPT_FILE, $file);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
fclose($file);?>
. (, http://www.yourwebsite.com/twitter/YOUR-PHP-FILE.php)
twitter, XMl YOUR-FILE-NAME.xml. , XML, .
5.
PHP script , ( 350 ) Cron.
script , , YOUR-FILE-NAME.xml.
6.
XML , , API.
, , - ?