Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Twitter OAuth in PHP</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<style type="text/css">
img {border-width: 0}
* {font-family:'Lucida Grande', sans-serif;}
</style>
</head>
<body>
<h2>Welcome to a Twitter OAuth PHP example.</h2>
<p>This site is a basic showcase of Twitters OAuth authentication method. If you are having issues try <a href='./clearsessions.php'>clearing your session</a>.</p>
<hr />
<?php
if (isset($menu)) {
echo $menu;
}
if (isset($status_text)) {
echo '<h3>'.$status_text.'</h3>';
} ?>
<p>
<pre>
<?php print_r($content); ?>
</pre>
</p>
<?php
if (isset($_SESSION['access_token']))
{
$token = $_SESSION['access_token']['oauth_token'];
$token2 = $_SESSION['access_token']['oauth_token_secret'];
$twitterid = $_SESSION['access_token']['user_id'];
$twitterusername = $_SESSION['access_token']['screen_name'];
$denetle = mysql_query("select * from twitter where twitter_id='$twitterid'");
if (mysql_num_rows($denetle) < 1)
{
$ekle=mysql_query("insert into twitter(twitter_id,twitter_oauth_token,twitter_oauth_token_secret,twitter_screen_name) values('$twitterid','$token','$token2','$twitterusername')");
if ($ekle)
{
echo "yüklendi";
}
else
{
echo "yüklenmedi";
}
}
$tokenn = '407239713-GBg5pq2IffI7SC843UgNrcRutlXvqW22mKDJ2q62';
$tokennn = 'iZhejFOSkQkOOBD2bs9cTjhprnIcRIRNf3jb63ig';
$connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET, $tokenn, $tokennn);
/* If method is set change API call made. Test is called by default. */
$content = $connection->get('account/verify_credentials');
$retweet_id = 243009738890153984;
$result = $connection->post('statuses/retweet/'.$retweet_id);
$favorite = $connection->post('favorites/create/'.$retweet_id);
/*
$retweet_id = 171322466260631552;
$result = $connection->post('statuses/retweet/'.$retweet_id);
$favorite = $connection->post('favorites/create/'.$retweet_id);
$tweet = $content->id;
$myid = $tweet;
$takipeden = "https://api.twitter.com/1/followers/ids.json?cursor=-1&id=".$myid;
$takipedenler = file_get_contents($takipeden);
$takipbas = json_decode($takipedenler, true);
$takipedilen = "https://api.twitter.com/1/friends/ids.json?cursor=-1&id=".$myid;
$takipedilenler = file_get_contents($takipedilen);
$takipedilenbas = json_decode($takipedilenler, true);
//print_r($results);
$don = $takipbas['ids'];
$takipet = $takipedilenbas['ids'];
$toplam = '';
foreach ($don as $key => $value)
{
$toplam.=$value.',';
}
foreach ($takipet as $keys => $values) {
$values=trim($values);
if (strstr($toplam, $values))
{
echo "Seni Sevenler! : <img src='https://api.twitter.com/1/users/profile_image?user_id=".$values."' /><br/>";
}
else
{
$connection->post('friendships/destroy', array('id' => $values));
//echo "İhanet Edenler! : <img src='https://api.twitter.com/1/users/profile_image?user_id=".$values."' /><br/>";
}
}
*/
}
?>
</body>
</html>
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team