Foros del Web » Creando para Internet » Sistemas de gestión de contenidos »

boton compartir me gusta de fb

Estas en el tema de boton compartir me gusta de fb en el foro de Sistemas de gestión de contenidos en Foros del Web. hola tenog una web q genera el boton de gusta y compartir auotmaticamente peor no aparece la descrion y el titulo de la url eston ...
  #1 (permalink)  
Antiguo 16/03/2012, 14:43
 
Fecha de Ingreso: marzo-2012
Mensajes: 13
Antigüedad: 12 años, 8 meses
Puntos: 3
boton compartir me gusta de fb

hola
tenog una web q genera el boton de gusta y compartir auotmaticamente peor no aparece la descrion y el titulo de la url eston los archivo 3 este son los 2 botones
<div style="margin-top:-4px;display:inline-block;">{if $_PREFER_IFRAME}<iframe src="http://www.facebook.com/plugins/like.php?href={$LIKE_URL_ENC}&amp;layout=button_co unt&amp;show_faces=true&amp;width=450&amp;action=l ike&amp;colorscheme=light&amp;height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:120px; height:20px;" allowTransparency="true"></iframe>{else}<fb:like href="{$LIKE_URL}" layout="button_count" show_faces="false"></fb:like>{/if}</div>
</div>
</div>
<div style="margin-left:20px;margin-right:2px;padding:0 10px 10px;min-height:67px;background: #aaaaaa">
{if $LIKE_TYPE == 1 && $LIKE_TEXT_TITLE_RAW != ''}
<div class="like-text">{$LIKE_TEXT_TITLE}</div>
{/if}
<div class="like-text">{$LIKE_TEXT}</div>
{if $LIKE_NAME != ''}<div style="font-size:10px;"><em>--- By: {$LIKE_NAME}</em></div>{/if}
{if $_SHOW_SHARE}
<div style="text-align:right;">
<link rel="stylesheet" type="text/css" href="http://static.ak.fbcdn.net/connect.php/css/share-button-css" />
<a name="fb_share" onclick="fbShare();return false;" href="#" style="text-decoration: none; "><span class="fb_share_size_Small "><span class="FBConnectButton FBConnectButton_Small" style="cursor:pointer;"><span class="FBConnectButton_Text">Share</span></span><span class="fb_share_count_nub_right fb_share_no_count"></span><span class="fb_share_count fb_share_no_count fb_share_count_right"><span class="fb_share_count_inner">&nbsp;</span></span></span></a>
<br />
<div class="bluebutton-cont"><a class="bluebutton" href="{if $_PRETTY_URLS}{$_SITE_SUBDIR}/search/special:random{else}search.php?k=special:random{/if}">See more Likes!</a></div>
</div>
<script type="text/javascript">function fbShare() { window.open('http://www.facebook.com/sharer.php?u={$LIKE_URL_ENC}&t={$LIKE_TEXT_TITLE_E NC}','sharer','toolbar=0,status=0,width=600,height =300'); }</script>


aqui esta la meta
<html xmlns="http://www.w3.org/1999/xhtml"
xmlnsg="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<meta property="fb:admins" content="{$FB_ADMINS}" />
<meta property="og:title" content="{if $_LIKE_PAGE}{$LIKE_TEXT_TITLE}{else}{$_SITE_NAME}{/if}"/>
<meta property="og:type" content="{if $_LIKE_PAGE}activity{else}website{/if}"/>
<meta property="ogite_name" content="{$_SITE_NAME_FB}"/>
<meta property="og:url" content="{if $_LIKE_PAGE}{$LIKE_URL}{else}{$_SITE_URL}{/if}"/>
<meta property="og:image" content="{if $_LIKE_PAGE && $LIKE_THUMB !== false}{$LIKE_THUMB}{else}{$_SITE_IMAGE}{/if}"/>
<meta property="og:description" content="{$_SITE_DESC}"/>



aqui el de la configuracion
<?php
define( 'APP_ROOT', './' );
require( APP_ROOT . 'world.php' );
$vars = array();
$rows = array();

$Id = (int) _GET( 'l' );

$result = $db->query( "SELECT * FROM `{$dbprefix}likes` WHERE `id`=$Id" );
if ( $result->num_rows > 0 )
{
$found = true;
$row = $result->fetch_object();
$vars = array(
'LIKE_ID' => $row->id,
'LIKE_NAME' => $row->name,
'LIKE_COMMS'=> ( $row->comments ) ? true : false,
'LIKE_TYPE' => $row->type,
'LIKE_TEXT' => get_Like( $row->type, $row->text ),
'LIKE_TEXT_TITLE' => strip_tags( get_Like_Title( $row->type, $row->text, $row->id, $row->title ) ),
'LIKE_TEXT_TITLE_RAW' => $row->title,
'LIKE_TEXT_TITLE_ENC' => urlencode( strip_tags( get_Like_Title( $row->type, $row->text, $row->id, $row->title ) ) ),
'LIKE_THUMB'=> get_Like_ogimage( $row->type, $row->text ),
'LIKE_URL' => get_like_url( $row->id ),
'LIKE_URL_ENC' => urlencode( get_like_url( $row->id ) ),
);
$liked = (int)$row->liked;
$shared = (int)$row->shared;

$result->free_result();
}

$vars['LIKES_MORE'] = array();
if ( strpos( $_SERVER[ 'USER_AGENT' ], 'facebookexternalhit' ) === false ) { // If it's the FB Bot, don't load all this.
/* BLOCK START */
$result = $db->query( "SELECT * FROM `{$dbprefix}likes` WHERE `pinned`='1' ORDER BY RAND() LIMIT 5" );
if ( $result->num_rows > 0 )
{
while ( $row = $result->fetch_object() )
{
$vars['LIKES_MORE'][] = array(
'id' => $row->id,
'text' => get_Like_Listing( $row->type, $row->text, $row->title ),
'url' => get_like_url( $row->id ),
'url_enc' => urlencode( get_like_url( $row->id ) ),
);
}
$result->free_result();
}

$result = $db->query( "SELECT * FROM `{$dbprefix}likes` WHERE `pinned`='0' ORDER BY `last_liked_at` DESC LIMIT 15" );
if ( $result->num_rows > 0 )
{
while ( $row = $result->fetch_object() )
{
$vars['LIKES_MORE'][] = array(
'id' => $row->id,
'text' => get_Like_Listing( $row->type, $row->text, $row->title ),
'url' => get_like_url( $row->id ),
'url_enc' => urlencode( get_like_url( $row->id ) ),
);
}
$result->free_result();
}
/* BLOCK END */
}

$vars = array_merge( $vars, array(
'_LIKE_PAGE' => true,
'_SHOW_SHARE' => $econf[ 'show_like_share' ],
'FOUND' => ( $found ) ? 1 : 0,
));
$tpl->assign( $vars );
$tpl->display( 'like.html' );

@ob_end_flush();

if ( $found ) {
// Check the liked counter.
$fb_query = 'SELECT like_count, share_count FROM link_stat WHERE url="' . get_like_url( $vars[ 'LIKE_ID' ] ) . '"';
$fb_param = array(
'method' => 'fql.query',
'query' => $fb_query,
'callback' => ''
);
$fb_result = $facebook->api( $fb_param );
if ( $fb_result[ 0 ][ 'like_count' ] != $liked || $fb_result[ 0 ][ 'share_count' ] != $shared ) {
$liked_old = $liked;
$liked = $fb_result[ 0 ][ 'like_count' ];
$shared = $fb_result[ 0 ][ 'share_count' ];
$last_liked_at = time();
$db->query( "UPDATE `{$dbprefix}likes` SET `liked`='$liked', `shared`='$shared', `last_liked_at`='$last_liked_at' WHERE `id`=$Id" );

// Let's do some tracking!
if ( $Change = $liked - $liked_old > 0 ) {
$db->query( "INSERT INTO `{$dbprefix}tracking` (`like_id`, `time`, `count`) VALUES ('%s', '%s', '%s')", $Id, time(), $Change );
}
}
unset( $fb_result );
}
?>

Etiquetas: gusta, html, php, botones
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:48.