Current location: Hot Scripts Forums » General Community » Script Requests » I need a script to work as a "likethis" script for Facebook


I need a script to work as a "likethis" script for Facebook

Reply
  #1 (permalink)  
Old 07-12-10, 01:28 PM
MaxEvans MaxEvans is offline
New Member
 
Join Date: Jul 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
I need a script to work as a "likethis" script for Facebook

There's been several sites popping up everywhere where you can submit a sentence or phrase, and people can "like" it on Facebook. I need a script that will work like that with a like button for each submission. Is there a script like that anywhere? Any help would be appreciated.
Reply With Quote
  #2 (permalink)  
Old 07-12-10, 10:56 PM
drsim's Avatar
drsim drsim is offline
Newbie Coder
 
Join Date: Jul 2010
Location: UK
Posts: 45
Thanks: 1
Thanked 1 Time in 1 Post
read the documentation of facebook developer network. it is very easy to implement. check out here.
Like Button - Facebook Developers
Reply With Quote
  #3 (permalink)  
Old 07-13-10, 12:24 AM
MaxEvans MaxEvans is offline
New Member
 
Join Date: Jul 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
I don't know very much about php.. but I can't seem to get this script working right. It won't show the ID and Site Name within the Facebook like script. Does anyone know how to edit it to get it to work right?

At the moment it shows up as liking the site title rather than the "likes" element. I changed the table name from "title" to "likes" because the Title was interfering. But it's still showing up as the site title. And I can't figure it out.


Code:
<?php
$url = urlencode("http://like.rambling-theory.com/?like=" . $id);
        $data = <<< _HTML

_HTML;

$msg = preg_replace("/\n/", " ", $msg);

?>


 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>

<html>

 
<title>Like Theory - Rambling Theory FBLike</title>
<meta name="description" content="Want to share anything with your Friends on FACEBOOK? We have this site for you. Come Share the Likes. We also have Many Top liked, Proverbs, Funny Quotes to be Liked." /> 
<meta name="keywords" content="like on facebook,forex,banking, likefb, likeylike, likeportal, facebook like, fblike, like things on facebook, like my things, like, like my views, facebooked likes, thefacebook, google, like on facebook"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" 
href="files/style.css" type="text/css">
<link rel="shortcut icon" href="/images/sitelogo.png" type="image/x-icon">
	<meta property="og:site_name" content="Like Theory"/>
	<meta property="og:url" content="http://like.rambling-theory.com/"/>
	<meta property="og:title" content="<?php '.$fetch[likes].'?>"/>

</head>
<body>
<div id="fb-root"></div>
 
	<script type="text/javascript" src="files/TyntLite.js"></script></head><body><div 
id="container">

	<?PHP
if($_GET['add']){
		if($_POST['aa'] == ""){
			echo'<script type="text/javascript">window.location = "?"; </script>';
		}else{
		$posted = mysql_real_escape_string($_POST[aa]);
			mysql_query("INSERT INTO `likes` (`likes`, `numLikes`) VALUES ('$posted', '0')");
			$select = mysql_query("SELECT * FROM `likes` WHERE `likes`='$_POST[aa]' AND `numLikes`='0'ORDER BY `id` DESC  LIMIT 1 ");
			$fetch = mysql_fetch_array($select);
			echo'<script type="text/javascript">window.location = "?id='.$fetch[id].'"; </script>';
			}
		
	}else if($_GET['id']){
		$select = mysql_query("SELECT * FROM `likes` WHERE `id`='$_GET[id]' LIMIT 1");
		$count = mysql_num_rows($select);
		if($count == 0){
			echo'<script type="text/javascript"> window.location = "?"; </script>';
		}else{
			$fetch = mysql_fetch_array($select);
			$count = $fetch[numLikes] + 1;
			$valm = $_GET[id] - 1;
			$valp = $_GET[id] + 1;
			mysql_query("UPDATE `likes` SET `numLikes`='$count' WHERE `id`='$_GET[id]'");
			echo'<meta property="og:title" content="'.$fetch[likes].'"/>
 

 

 
	<div id="box_0">
		<div id="head_0">
 
		</div>
		<div id="content_0">

                  <table width=100%><td align="left"><p class="big"><a href="http://like.rambling-theory.com"><font color="white">Like Theory</font></a></td><td align="right"><font size="5"><a href="?id='.$valm.'">Previous Page</a> | <a href="?id='.$valp.'">Next Page</a></font></td></table></p><BR>
 <center>
<script type="text/javascript"><!--
google_ad_client = "pub-4111169165033977";
/* 468x60, created 6/11/10 */
google_ad_slot = "2533550869";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>



<center>
<b>	<p><font size="5"><font color="#e71818">'.$fetch[likes].'</font></font></p></b>

<img src="http://like.rambling-theory.com/images/arrow2.png"><font size="2">Click on Like to Show this On Your Facebook WALL</font>

<p><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Flike.rambling-theory.com%2F%3Fid%3D%27.%24_GET%5Bid%5D.%27&amp;layout=standard&amp;show_faces=true&amp;width=450&amp;action=like&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe></p>
</center>


<center>
<script type="text/javascript"><!--
google_ad_client = "pub-3805657647131319";
google_ad_slot = "8300161717";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>


</center>


<center>
<BR><a href="http://like.rambling-theory.com/"><font size="2"><u>Want to Share Anything with your friends to LIKE on FACEBOOK? CLICK HERE</u></font></a></p>
</center>




 
        	</div>
		</div>
		<img src="/images/motionspace.png" alt="Spacer" border="0">';
		}
	}else{
	?>

</center><img src="/logo.png"></center>
	<div id="commentsparent">
<div id="comments">
		<form method="POST" action="?add=new" name="formLike">
		<textarea cols="50" rows="4" name="aa" class="comments"></textarea>
	</div>
	</div>
	</form>
	<div align="right">
		<a href="#" onClick="javascript:document.formLike.submit();"><img  src="files/like1.png" alt="Like" width="291" height="110" border="0" 
type="image"></a>	</div>       
	<? } ?> 
 
 
 
 
<div id="bottomboxes">
 
	<div id="box_1">
 
		<div id="head_1">
<font size="48px"><p class="big">Top Likes</p></font>
 
		</div>
 
		<div id="content_1">
					<?PHP
						$select = mysql_query("SELECT * FROM `likes` ORDER BY `numLikes` DESC LIMIT 15");
						$count = mysql_num_rows($select);
						if($count == 0){
							echo'<font size="2px">• Currently no top likes<br></font>';
						}else{
							while($fetch = mysql_fetch_array($select)){
								echo'<font size="2px">•<a href="?id='.$fetch[id].'">'.$fetch[likes].'</a><br></font>';
							}
						}
						?>
	  </div>
 
	</div>
 
	<div id="box_2">
 
		<div id="head_2">
 
		   <font size="48px"><p class="big">Recent Likes</p></font>
 
		</div>
 
		<div id="content_2">
<?PHP
						$select = mysql_query("SELECT * FROM `likes` ORDER BY `id` DESC LIMIT 15");
						$count = mysql_num_rows($select);
						if($count == 0){
							echo'<font size="2px">• Currently no likes<br></font>';
						}else{
							while($fetch = mysql_fetch_array($select)){
								echo'<font size="2px">• <a href="?id='.$fetch[id].'">'.$fetch[likes].'</a><br></font>';
							}
						}
						?>
		</div>
 
	</div>
 
      </div>
 
 
 
      </div>
 
</body></html>
Reply With Quote
  #4 (permalink)  
Old 07-13-10, 04:04 AM
clcheapshoes520's Avatar
clcheapshoes520 clcheapshoes520 is offline
New Member
 
Join Date: Jul 2010
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for post. It’s really informative stuff.I really like to read.Hope to learn a lot
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get any Paypal IPN script to work Oskare100 PHP 3 10-29-06 06:49 AM
Integrating autosurf script PHP MYSQL $$ work Pixel Logix Job Offers & Assistance 0 05-07-06 06:30 PM
Is there any integrity of script rankings? webmaster@atmanager.com Hot Scripts Forum Questions, Suggestions and Feedback 17 08-06-04 12:12 AM


All times are GMT -5. The time now is 10:04 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.