4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: budduke on March 28, 2011, 12:05:49 AM

Title: [MOD] Facebook like/share/send button
Post by: budduke on March 28, 2011, 12:05:49 AM
[MOD] Facebook like/share/send button
Version 3.1

Demo My website http://www.budduke.com/gallery (http://www.budduke.com/gallery)

based off of jeyjoo's modifications that was posted in the programming section of this site
versions history
1.0 initial version
1.1 fixed error in Header file insert pointed out by Jeyjoo in reply#2. Changed insert in header.html
1.2 fixed error when you had html code in your description field on your images. Changed insert for details.html
2.0 reworked the code so I think it will work correctly this time
2.1 Added Iframe for the like button for sites that need it.
3.0 reworked code to work with appid from facebook application
3.1 made this mod work better with version 2 of my facebook login mod

I have been reading everyone's attempts/problems regarding this and this is what I came up with...
Version 2.0 now works with your categorie thumbnail pages
Version 3.0 now has a main like button for your site.

Please read my post on how to create an application on facebook and other issues
http://www.4homepages.de/forum/index.php?topic=29422.msg157086#msg157086 (http://www.4homepages.de/forum/index.php?topic=29422.msg157086#msg157086)
You Must Create an Application on Facebook for this Mod to work

You only need to modify these files to make this work
your templates/header.html
your templates/details.html
your templates/thumbnail_bit.html New to version 2.0
includes/page_header.php New to version 2.0
includes/functions.php New to version 2.0
admin/settings.php New to Version 3.0
lang/english/admin.php New to Version 3.0
lang/english/main.php Optional New to Version 3.0
details.php (Mod no longer using this file, need to remove mod from this file if you have older version of this mod installed


Like always, Backup these files and Database before you begin

New for version 3.0
Step 0
you will need to download the attached file, unzip it, place the file in your root folder of your gallery, and run the installer file so it can place the fields in your settings database.
Delete this file after you run it.

Step 1
in your includes/page_header.php file Updated for version 3
search for
Code: [Select]
?>insert Before
Code: [Select]
//[MOD] Facebook Like Button
if ($array["details"]){
$sql = "SELECT image_name, cat_id, image_thumb_file, image_description
FROM ".IMAGES_TABLE."
WHERE image_id = $image_id AND image_active = 1";
$image_row = $site_db->query_firstrow($sql);
$facebook['image'] = get_file_path($image_row['image_thumb_file'], "thumb", $image_row['cat_id'], 0, 1);
$facebook['image'] = $script_url.substr($facebook['image'],1);
$facebook['title'] = $image_row['image_name'];
$facebook['type'] = "article";//this is what facebook says images should be filed under
$facebook['description'] = !empty($image_row['image_description']) ? strip_tags($image_row['image_description']) . ". " : "";
$facebook['url1'] = $site_sess->url($script_url."/".$self_url);
if (strpos($facebook['url1'],"&")){
$facebook['url1']=substr($facebook['url1'],0,strpos($facebook['url1'],"&"));
}
}
else{
$facebook['image'] = $config['fb_image'];
$facebook['title'] = $config['fb_title'];
$facebook['type'] = "website";// types setting for your default website
$facebook['description'] = strip_tags($config['fb_description']);
$facebook['url1'] = $config['fb_main_url'];
}
$facebook['main_url']= $config['fb_main_url'];
$site_template->register_vars(array(
"fb_title" => $facebook['title'],
"fb_image" => $facebook['image'],
"fb_type" => $facebook['type'],
"fb_desc" => $facebook['description'],
"fb_url1" => $facebook['url1'],
"fb_main_url" => $facebook['main_url'],
"fb_appid" => $config['fb_appid'],
"fb_admins" => $config['fb_admins'],
"fb_language" => ($lang['fb_language']) ? $lang['fb_language'] : $config['fb_language']
)
);
unset($facebook, $image_row);
//END [MOD] Facebook Like Button

Step 2.a (this insert is the same as my facebook login MOD V2 step 9.a)
in your templates/header.html file
search for
Code: [Select]
<html dir="{direction}">Replace with
Code: [Select]
<html dir="{direction}" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

Step 2.b New to version 2.0, Updated for version 3
search for
Code: [Select]
<title>.....</title>insert After
Code: [Select]
<script src="http://connect.facebook.net/{fb_language}/all.js#xfbml=1"></script>
<meta property="fb:app_id" content="{fb_appid}"/>
<meta property="fb:admins" content="{fb_admins}"/>
<meta property="og:type" content="{fb_type}"/>
<meta property="og:site_name" content="{site_name}"/>
<meta property="og:url" content="{fb_url1}"/>
<meta property="og:title" content="{fb_title}"/>
<meta property="og:description" content="{fb_desc}"/>
<meta property="og:image" content="{fb_image}"/>

Step 2.c Optional New to version 2.0, Upated for version 3Updated for version 3.1
(this insert is the same ans my facebook login mod version 2 step 9.b)
Note: You do not have to place this code in your page.
Note: I have noticed the site loads faster with this code placed in it.
Note: I have noticed a flicker when some sites load with this code placed in them (That is why I am giving you the option)

Insert at the very end of the document
Code: [Select]
<div id="fb-root"></div>
    <script>
  window.fbAsyncInit = function() {      
        FB.init({
          appId: '{fb_appid}',
          cookie: true,
          xfbml: true
        });
        FB.Event.subscribe('auth.logout', function(response) {
          window.location = '{fb_logout_url}';
        });
      };
      (function() {
        var e = document.createElement('script'); e.async = true;
        e.src = document.location.protocol +
          '//connect.facebook.net/{fb_language}/all.js';
        document.getElementById('fb-root').appendChild(e);
      }());
</script>
Remove
Code: [Select]
<script src="http://connect.facebook.net/{fb_language}/all.js#xfbml=1"></script>from the code you placed in Step 2.b



Step 3.a  New to version 2.0
in your includes/functions.php file
Search for
Code: [Select]
global $self_url, $site_template, $site_sess, $user_info, $config, $cat_cache, $lang, $additional_image_fields, $user_table_fields, $url_show_profile;Replace with
Code: [Select]
global $self_url, $site_template, $site_sess, $user_info, $config, $cat_cache, $lang, $additional_image_fields, $user_table_fields, $url_show_profile, $script_url;//[MOD] Facebook Like Button
Step 3.b New to version 2.0
Search for
Code: [Select]
$rate_form = ""insert Before
Code: [Select]
 //[MOD] Facebook Like Button
  $fb_url= $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id']);
  $fb_url= $script_url.substr($fb_url,1);
  if (strpos($fb_url,"&")){
$fb_url= substr($fb_url,0,strpos($fb_url,"&"));
}
  $site_template->register_vars("fb_url",$fb_url);
  //end [MOD] Facebook Like Button

Step 4 Changed in version 2.0
In your templates/details.html  and templates/thumbnail_bit.html file
Place this code where you want the like button to appear
Code: [Select]
<fb:like href="{fb_url}" layout="button_count" show_faces="false" width ="90"></fb:like>Or if you prefer or you site needs the IFRAME version of facebook's like button insert this code instead...
Code: [Select]
<iframe src="http://www.facebook.com/plugins/like.php?href={fb_url}&layout=button_count&show_faces=false&width=90&action=like&font&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
Step 5.a New to version 3.0
(this insert is the same as my facebook login MOD V2 step 1.a)
In your admin/settings.php file
Search for
Code: [Select]
// end of functionsInsert Before
Code: [Select]
//[MOD] Facebook Like Button
function show_fb_language_options($setting_name, $setting_value) {
  global $fb_language_optionlist;
  echo "<select name=\"setting_item[".$setting_name."]\">";
  foreach ($fb_language_optionlist as $key => $val) {
    echo "<option value=\"$key\"";
    if ($setting_value == $key) {
      echo " selected=\"selected\"";
    }
    echo ">".$val."</option>";
  }
  echo "</select>";
}
//END [MOD] Facebook Like Button

Step 5.b New to version 3Updated in version 3.1
(this insert is the same as my facebook login MOD V2 step 1.b)
Search for
Code: [Select]
show_form_footer($lang['save_changes'], "", 2);
Insert Before
Code: [Select]
// [MOD] Facebook
  show_table_separator($setting_group["facebook"], 2, "setting_group_facebook");
  show_setting_row("fb_appid");
  if ($fb_mod_select==1 || $fb_mod_select==3){
   show_setting_row("fb_appsec");
  }
  if ($fb_mod_select>1){
   show_setting_row("fb_admins");
   show_setting_row("fb_title");
   show_setting_row("fb_main_url");
   show_setting_row("fb_image");
   show_setting_row("fb_description","textarea");
  }
  show_setting_row("fb_language","show_fb_language_options");
// END[MOD] Facebook

Step 6 New to version 3.0Updated for version 3.1
(this insert is the same as my facebook login V2 step 5)
Note: first line $fb_mod_select=2 (change to 3 if using both mods)
In your \lang\english\admin.php file
Search for
Code: [Select]
?>Insert Before
Code: [Select]
//[MOD] Facebook
$fb_mod_select=2; // 1="login button Mod", 2="like/share/send button Mod", 3="both Mods installed"
/*-- Setting-Group Facebook --*/
$setting_group["facebook"]="Facebook settings";
$setting['fb_appid'] = "Application ID";
$setting['fb_appsec'] = "Application Secret";
$setting['fb_admins'] = "List of facebook IDs as admins<br><span class=\"smalltext\">IDs seperated by commas</span>";
$setting['fb_main_url'] = "Full HTML path to your website<br><span class=\"smalltext\">What you placed in the connect URL on facebook</span>";
$setting['fb_image'] = "Full HTML path to your logo/image for your website";
$setting['fb_title'] = "What you would like the Main Title to say for your website";
$setting['fb_description'] = "Description displayed for your website<br><span class=\"smalltext\">HTML code will be removed</span>";
$setting['fb_language'] = "Default language to use for Facebook";
$fb_language_optionlist = array(
'ca_ES' => 'Catalan',
'cs_CZ' => 'Czech',
'cy_GB' => 'Welsh',
'da_DK' => 'Danish',
'de_DE' => 'German',
'eu_ES' => 'Basque',
'en_PI' => 'English (Pirate)',
'en_UD' => 'English (Upside Down)',
'ck_US' => 'Cherokee',
'en_US' => 'English (US)',
'es_LA' => 'Spanish',
'es_CL' => 'Spanish (Chile)',
'es_CO' => 'Spanish (Colombia)',
'es_ES' => 'Spanish (Spain)',
'es_MX' => 'Spanish (Mexico)',
'es_VE' => 'Spanish (Venezuela)',
'fb_FI' => 'Finnish (test)',
'fi_FI' => 'Finnish',
'fr_FR' => 'French (France)',
'gl_ES' => 'Galician',
'hu_HU' => 'Hungarian',
'it_IT' => 'Italian',
'ja_JP' => 'Japanese',
'ko_KR' => 'Korean',
'nb_NO' => 'Norwegian (bokmal)',
'nn_NO' => 'Norwegian (nynorsk)',
'nl_NL' => 'Dutch',
'pl_PL' => 'Polish',
'pt_BR' => 'Portuguese (Brazil)',
'pt_PT' => 'Portuguese (Portugal)',
'ro_RO' => 'Romanian',
'ru_RU' => 'Russian',
'sk_SK' => 'Slovak',
'sl_SI' => 'Slovenian',
'sv_SE' => 'Swedish',
'th_TH' => 'Thai',
'tr_TR' => 'Turkish',
'ku_TR' => 'Kurdish',
'zh_CN' => 'Simplified Chinese (China)',
'zh_HK' => 'Traditional Chinese (Hong Kong)',
'zh_TW' => 'Traditional Chinese (Taiwan)',
'fb_LT' => 'Leet Speak',
'af_ZA' => 'Afrikaans',
'sq_AL' => 'Albanian',
'hy_AM' => 'Armenian',
'az_AZ' => 'Azeri',
'be_BY' => 'Belarusian',
'bn_IN' => 'Bengali',
'bs_BA' => 'Bosnian',
'bg_BG' => 'Bulgarian',
'hr_HR' => 'Croatian',
'nl_BE' => 'Dutch (België)',
'en_GB' => 'English (UK)',
'eo_EO' => 'Esperanto',
'et_EE' => 'Estonian',
'fo_FO' => 'Faroese',
'fr_CA' => 'French (Canada)',
'ka_GE' => 'Georgian',
'el_GR' => 'Greek',
'gu_IN' => 'Gujarati',
'hi_IN' => 'Hindi',
'is_IS' => 'Icelandic',
'id_ID' => 'Indonesian',
'ga_IE' => 'Irish',
'jv_ID' => 'Javanese',
'kn_IN' => 'Kannada',
'kk_KZ' => 'Kazakh',
'la_VA' => 'Latin',
'lv_LV' => 'Latvian',
'li_NL' => 'Limburgish',
'lt_LT' => 'Lithuanian',
'mk_MK' => 'Macedonian',
'mg_MG' => 'Malagasy',
'ms_MY' => 'Malay',
'mt_MT' => 'Maltese',
'mr_IN' => 'Marathi',
'mn_MN' => 'Mongolian',
'ne_NP' => 'Nepali',
'pa_IN' => 'Punjabi',
'rm_CH' => 'Romansh',
'sa_IN' => 'Sanskrit',
'sr_RS' => 'Serbian',
'so_SO' => 'Somali',
'sw_KE' => 'Swahili',
'tl_PH' => 'Filipino',
'ta_IN' => 'Tamil',
'tt_RU' => 'Tatar',
'te_IN' => 'Telugu',
'ml_IN' => 'Malayalam',
'uk_UA' => 'Ukrainian',
'uz_UZ' => 'Uzbek',
'vi_VN' => 'Vietnamese',
'xh_ZA' => 'Xhosa',
'zu_ZA' => 'Zulu',
'km_KH' => 'Khmer',
'tg_TJ' => 'Tajik',
'ar_AR' => 'Arabic',
'he_IL' => 'Hebrew',
'ur_PK' => 'Urdu',
'fa_IR' => 'Persian',
'sy_SY' => 'Syriac',
'yi_DE' => 'Yiddish',
'gn_PY' => 'Guaraní',
'qu_PE' => 'Quechua',
'ay_BO' => 'Aymara',
'se_NO' => 'Northern Sámi',
'ps_AF' => 'Pashto',
'tl_ST' => 'Klingon'
);
//END [MOD] Facebook

Step 7 Optional New to Version 3.0
In your template files, you can now add a main like button for your site
Code: [Select]
<fb:like href="{fb_main_url}" layout="button_count" show_faces="false" width ="90"></fb:like>Or if you prefer or you site needs the IFRAME version of facebook's like button insert this code instead...
Code: [Select]
<iframe src="http://www.facebook.com/plugins/like.php?href={fb_main_url}&layout=button_count&show_faces=false&width=90&action=like&font&colorscheme=light&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>
Step 8 Optional New to Version 3.0
In your /lang/whatever language/main.php file
Search for
Code: [Select]
?>Insert Before
Code: [Select]
//[MOD] Facebook Like Button
$lang['fb_language'] = "en_US";
//END [MOD] Facebook Like Button
By placing the correct information for the language in your different language folders, when a user is using that language, the Like button will appear in the correct language. You can look at the array placed in step 6 for the correct format for entering the different languages

And you are finished...
New to Version 3.0
You now have a place in the ACP panel, under settings to place your facebook information so you do not have to edit your code all the time.
The app id is the one from the application you created in facebook,
Admins are facebook users you want to be admins for your pages,
The rest are fields for you to fill out for the main url link for your site used in step 7.

NOTES:
By placing the meta tags in the header like Jeyjoo sugested, the mod now passes validation tests  :)

The slowness you see in the like buttons appearing is facebook querying your pages to get the meta data before it displays the info. At this point, I can not find a way around this. I also noticed that when my categorie pages where loading, I had 40 guest hits from facebook for updating the like buttons. This may cause a problem with shared hosting. But after facebook caches your pages the hits should go down.

What about the Share button?
Facebook is no longer improving on the share button but they will continue to allow it to be used...
Here is the link for the steps you need to do to change it to the Share button
http://www.4homepages.de/forum/index.php?topic=29422.msg156985#msg156985 (http://www.4homepages.de/forum/index.php?topic=29422.msg156985#msg156985)

Send button?
Just came out, it allows you to send the link to just a couple of users or group and not posting on your profile...
You can still change the code in step #4 or add a new button with Send by
changing
Code: [Select]
<fb:like
to
Code: [Select]
<fb:send
and
Code: [Select]
</fb:like> to
Code: [Select]
</fb:send>
Or you can add the send function to the like button (like my site is displaying) that only makes one call to facebook for the one button by changing step 4 to

Code: [Select]
<fb:like href="{fb_url}" layout="button_count" show_faces="false" send="true" width ="90"></fb:like>Or if you prefer or you site needs the IFRAME version of facebook's like button with send button...
Code: [Select]
<iframe src="http://www.facebook.com/plugins/like.php?href={fb_url}&layout=button_count&show_faces=false&width=90&action=like&font&colorscheme=light&send=true&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:90px; height:21px;" allowTransparency="true"></iframe>

I hope this helps!


These items need to be removed if you have version 1 of this mod installed...

In your details.php file
REMOVE
Code: [Select]
//MOD facebook like/share
$fb_url = $site_sess->url($script_url."/".$self_url);
$facebook_image = get_file_path($image_row['image_media_file'], "thumb", $cat_id, 0, 1);
$facebook_image = $script_url.substr($facebook_image,1);
if (strpos($fb_url,"&")){
$fb_url=substr($fb_url,0,strpos($fb_url,"&"));
}
$site_template->register_vars(array(
"facebook_title" => $image_name,//change this to what you want the title to be (image_name by default)
"facebook_image" => $facebook_image,
     "fb_url" => $fb_url)
);
unset($fb_url, $facebook_image);
//END MOD facebook like/share


in your templates/details.html file
REMOVE
Code: [Select]
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:like  href="{fb_url}" layout="button_count" show_faces="true" width ="40">
<meta property="og:url" content="{fb_url}"/>
<meta property="og:title" content="{facebook_title}"/>
<meta property="og:description" content="{detail_meta_description}"/>
<meta property="og:image" content="{facebook_image}" />
<meta property="og:type" content="company" />
<meta property="fb:admins" content="LIST OF FACEBOOK ADMIN IDS" />
</fb:like>

Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on April 04, 2011, 06:00:16 AM
This didn't work for me. It left "stray code" dangling somehow by the Like button.
If you want to see it in action, email me and I'll upload the details.html file with the like button code in it to let you see what it does to my set up.
Version: 1.7.9

Terry
Title: Re: [MOD] Facebook like/share/send button
Post by: jeyjoo on April 04, 2011, 11:19:51 AM
OK, I got this fully working.
a link to my image gallery home is http://www.jeyjoo.com/gallery/index.php

On my details page, when a user clicks like, a foto, page link, name and description are sent to facebook.

It is not totally clear from Budduke above, but in your header.html file, your final <HTML> statement should be:

1. <html dir="{direction}"  xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

2. The fb meta tags really should be within the page header tags (in the header.html file).

Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 04, 2011, 07:26:38 PM
OK, I got this fully working.
a link to my image gallery home is http://www.jeyjoo.com/gallery/index.php

On my details page, when a user clicks like, a foto, page link, name and description are sent to facebook.

It is not totally clear from Budduke above, but in your header.html file, your final <HTML> statement should be:

1. <html dir="{direction}"  xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

2. The fb meta tags really should be within the page header tags (in the header.html file).

point#1. You may be correct. It seems to work fine on all my browsers but googling around seems that you should only have one <html tag in your document

point#2. the only downside to having it in the header means bogus info will also be there in the categorie and index and all the other pages because they all share the same header.html file.
I am looking ahead of this quick fix. I am trying to make it so you can have like buttons under all your thumbnails on the categorie pages so you do not have to pull up the detail page to like them. Not actually sure if it will work or not but that is the main reason I placed them in the main details instead of the header so nobody would have to move them later.

This didn't work for me. It left "stray code" dangling somehow by the Like button.
Version: 1.7.9
Your problem should now be fixed with version 1.2 of this mod. You had html code in your description area that I forgot about. I changed what info it is looking at to pass to facebook so it should all work for you now.
Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on April 05, 2011, 06:57:40 AM
Thanks for this.
On my page however - it doesn't *look* like the typical Facebook "share" graphic.
See here for a sample:
http://alrioart.com/details.php?image_id=4440

Also - when sharing it doesn't pick up the thumbnail image. I'd really love to share the main image itself. Any way?

Update - it doesn't include the image EVERY TIME. I posted twice earlier tonight with image and once *just now* that showed the thumbnail image.
Fingers crossed!

Terry
Title: Re: [MOD] Facebook like/share/send button
Post by: jeyjoo on April 05, 2011, 11:37:12 AM
Budduke - my understanding is that you can put as many likes on one page as you like, though having lots of javascript calls may slow down page load though.

Comicart - Have you tried fascebooker linter to test your page. You can debug your URL here - http://developers.facebook.com/tools/lint/

Jeyjoo
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 05, 2011, 03:56:06 PM
Thanks for this.
On my page however - it doesn't *look* like the typical Facebook "share" graphic.
See here for a sample:
http://alrioart.com/details.php?image_id=4440

Also - when sharing it doesn't pick up the thumbnail image. I'd really love to share the main image itself. Any way?

Update - it doesn't include the image EVERY TIME. I posted twice earlier tonight with image and once *just now* that showed the thumbnail image.
Fingers crossed!

Terry

You need to check how you are handling hotlinking on your site.
When I type in this path in my browser to one of your thumbnails http://alrioart.com/data/thumbnails/7/alrio_ld5.jpg (http://alrioart.com/data/thumbnails/7/alrio_ld5.jpg)
It comes up with a page that says "hang on" and then goes to your homepage. Facebook does not see the thumbnail to add it.
Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on April 05, 2011, 08:11:15 PM
You need to check how you are handling hotlinking on your site.

That did it. Thumbnails now show. I changed hotlink protection to "allow" direct requests.

Next issue - How to I get it to pull up the Image Title and Description when sharing?
Right now it just says the name of the site when I share.

Thanks for this!
T
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 06, 2011, 12:59:14 AM
Next issue - How to I get it to pull up the Image Title and Description when sharing?
Right now it just says the name of the site when I share.

attached is what it looks like to me when I post one of your images on facebook.
The title is the name of your image, your site is listed under it, and the description is next.
Are you wanting it to be something different?
Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on April 06, 2011, 01:15:39 AM
That's perfect but now how my latest share worked.
See this image:

UPDATE - Tested again - it worked as expected. Thanks for this Mod!
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 07, 2011, 03:39:22 PM
Hello,
thank you for the mod. But i have also the problem that the image will not going to Facebook, only the link to my Homepage. How can i put the Facebok "like"-Buttons into my page with the miniature pictures? In which file i have to put the lines instead of in the details.html?
Thank you...
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 07, 2011, 03:56:32 PM
Hello,
thank you for the mod. But i have also the problem that the image will not going to Facebook, only the link to my Homepage. How can i put the Facebok "like"-Buttons into my page with the miniature pictures? In which file i have to put the lines instead of in the details.html?
Thank you...
Can you give me a link to look at so I can see what facebook is seeing?
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 07, 2011, 04:03:04 PM
This is the link to the page with the miniature pictures: http://www.partysite-badens.de/neu/partybilder.html.

If i click to one of the fotos to see it in the whole size, there you can klick to "like it" and the link is shown on FAcebook. But not the picture...

After reading this here, i think, i have to put the "like it"-Buttons on the site with the miniatures...

Thank you.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 07, 2011, 04:13:08 PM
Opps, I think that was my bad.
Redo the step #2 (I left out a quote)  :oops:

The rest of it looks good after make that change...

Yes, you are correct, this only works on the details page not the thumbnail page.
Still do not have that perfected yet, so your other method should work till then.
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 07, 2011, 04:21:19 PM
Sorry, but i don`t understand you exactly. I also did step 2...where is the change or the error in your step?
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 07, 2011, 04:22:39 PM
Sorry, but i don`t understand you exactly. I also did step 2...where is the change or the error in your step?

Sorry, I modified the step two in the code above, or if you are looking at your header.html file
You need to put a " after the {direction} in that line.
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 07, 2011, 04:37:43 PM
Ok, i found the error...

But the problem is still there...

If i click the facebook-button, on my facebook-profile is only the link to my page und not the picture...here the result: http://www.partysite-badens.de/test.jpg
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 07, 2011, 04:48:55 PM
Yes, I am seeing that same thing on your site. It is like it is not seeing the og stuff in the links.
Not sure why, al your code looks correct.
One thing you could try which Jeyjoo pointed out that people that I have worked with said you no longer need to do is to put the information in the header.html file instead of the details...

UPDATE: I think I figured it out...

Your gallery is running inside of a frame...
Do step#2 to your main header page for your site and lets see what happens...
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 07, 2011, 05:41:45 PM
Thank you for your tips. But the problem ist still there.

I have copied the code into this site: http://www.partysite-badens.de/neu/partybilder.html, but the problem ist also there. Is there no opinion to copy the code in the site with the miniature images? I think, there ist not another way to get this wonderful mod.
Title: Re: [MOD] Facebook like/share/send button
Post by: Loda on April 07, 2011, 05:57:10 PM
i'ver a question:
can you post the first code you make in the step 2?
I've got problems with the modified code in step 2.
with your first code it runs for me.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 07, 2011, 07:27:01 PM
i'ver a question:
can you post the first code you make in the step 2?
I've got problems with the modified code in step 2.
with your first code it runs for me.


What I left out in step 2 was the quote that is after {direction}
There should be
Code: [Select]
"{direction}" xmln...  and not
Code: [Select]
"{direction}  xmln...
You can also try this...
Code: [Select]
<html dir="{direction}">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 07, 2011, 07:41:54 PM
Too bad that this mod doesn`t work on my Hompage. I think the problem is that my gallery is in an iframe, so that the mod have problems with the url of the image.

If somebody has another idea to solve this problem...

Thanks...
Title: Re: [MOD] Facebook like/share/send button
Post by: Loda on April 07, 2011, 07:50:54 PM
@ budduke
ok.. thank you..
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 07, 2011, 08:21:56 PM
Too bad that this mod doesn`t work on my Hompage. I think the problem is that my gallery is in an iframe, so that the mod have problems with the url of the image.

If somebody has another idea to solve this problem...

Thanks...

I have some ideas but will not have time till this weekend to mess around with it...
I think I might have figured out how to get the thumbnails pages to work also by researching into your problem.

VERSION 2.0 just posted with what I think will fix all problems
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 10, 2011, 02:56:18 PM
Hello,
than you für you updated Mod. Now i see the like-buttons on my miniature imagines site, but it still doesn`t work. If i click to one of these buttons, the field to put a commentar opens, but it closes a few seconds later so that i can´t put a commentar. And if i click to the button "like", my facebook site doesn´t show this.
I tested this with a picture from your homepage and there it works.
Perhaps you have an idea, where the problem is...
Do i need a facebook app id for this? no, or?
Thank you.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 10, 2011, 06:25:55 PM
Try removing these meta tags from your header.html file...
Code: [Select]
<meta property="fb:admins" content="YOUR FACEBOOK ADMIN IDS"/> <!-- delete if not used-->
<meta property="fb:app_id" content="YOUR FACEBOOK APPLICATION ID"/> <!-- delete if not used-->

The one thing I saw in the thumbnail pages is that you have the like button inside your <sup></sup> tag. Try placing it outside of that tag.

the rest of the code looks correct. I do have a facebook appid set for my site so I can play around with their insight area that monitors it but when I was testing it I did not have an appid in the code.
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 10, 2011, 08:01:47 PM
Thanks for your help. I deleted the both meta-tags and put the code behind the sup-Tag, but the problem is still there. Sorry.

Is perhaps the problem with the links to the facebook-server? I have the files on my server so you can also see the problem. If you click on the like-button the comment-field goes away befor you can write something there :-(
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 10, 2011, 08:46:03 PM
Try putting Step 2.c in your webpage...
I am beginning to believe it has something to do with your iframe...
I will have to setup a test site using iframe to see what I can see on my end...
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 10, 2011, 09:06:42 PM
Hello,

i also think that the problem is the iframe. If you find a solution to solve this problem by testing with a test-site, i will be glad.

For the moment, i deleted the new files from my homepage so that the old condition is there.

Thanks.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 12, 2011, 01:23:44 AM
@ Michi26,
Here is what I came up with on my testing...
On your main index page for your website (outside of the 4images site)
Change
Code: [Select]
<html dir="{direction}">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"><!-- InstanceBegin template="/Templates/vorlage.dwt" codeOutsideHTMLIsLocked="false" -->
To
Code: [Select]
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"><!-- InstanceBegin template="/Templates/vorlage.dwt" codeOutsideHTMLIsLocked="false" -->

and remove this from your main index page also...
Code: [Select]
       <div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: 'YOUR APP ID', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>

Now on the 4images site... notice my new entries written in red on my original post. If you do not add those meta fields and do not insert the script into your header.html file, my test site ran fine inside of an iframe.
Let me know if it works for you...
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 15, 2011, 06:16:39 PM
Hello,

today i have a little free-time to test your new mod. But the first step is the first problem at my page. I only have this on the main page: <html xmlns="http://www.w3.org/1999/xhtml">. Is this the part to change? If i change this, i get the follow error message: "unbalanced InstanceBegin-Tag". With this error, i can´t change my other pages with this code...

Do you have a solution for the problem? Is there a missing part?

Thanks.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 15, 2011, 10:04:01 PM
@michi26,
Oh, the one you are describing is your main,main page which I saw what you were saying.
I was pulling up your link that you posted as http://www.partysite-badens.de/neu/partybilder.html (http://www.partysite-badens.de/neu/partybilder.html) That page is where I saw what needed to be changed. try changing the top of that page instead.
Sorry, from googling, it seems like that error is something to do with dreamweaver and templates, hopefully you will not see that error is you edit the link I posted above.
Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on April 15, 2011, 10:30:46 PM
I just upgrade to 2.0
How do I change the button to "Share" instead of like?

Terry
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 16, 2011, 12:09:53 AM
I just upgrade to 2.0
How do I change the button to "Share" instead of like?

Terry

Facebook will no longer be developing the share button. The like button does everything that the share button did.
They said that the share button will still work but nothing will be added to it down the road.
That is why I removed the note at the bottom of my original post.
You can still change the code in step #4
Code: [Select]
<fb:like to
Code: [Select]
<fb:share-button and
Code: [Select]
</fb:like> to
Code: [Select]
</fb:share-button>
Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on April 16, 2011, 08:15:26 AM
Thanks  - I just changed it.
The functionality is much different. Using "Share" it prompt you to enter your own comment about the image.
But on first test, it didn't pick up the title or description of the image.

Attached...
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on April 16, 2011, 03:25:37 PM
Sorry, i put the wrong file to update...

Now i put the new code in the right file bit it doesn`t work. I still have the same problem :-(

Here is the link to see it: http://www.partysite-badens.de/neu/Kopievonpartybilder.html

At the first time, i tested it, i get the link to my facebook-site without the image, but now i don`t get the link or the image...

Do you have an idea, where the problem is?

Thanks.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 16, 2011, 05:51:58 PM
@ Michi26
On the page for the link http://www.partysite-badens.de/neu/partybilder.html (http://www.partysite-badens.de/neu/partybilder.html) I also saw this code that needs to be removed...
Code: [Select]
       <div id="fb-root"></div>
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: 'YOUR APP ID', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
    var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/en_US/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>

If that still does not work then I am not sure, I stay away from iframes unless there is no other way...
The only other thing I would try is on that above link, in the <head></head> area place this code...
Code: [Select]
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
also, you can try removing the #xfbm1=1 from the above code and from where my mod tells you to insert it to force facebook to send the entire javascript code when requested.

If you are able to hack into the code you placed in your last post without destroying your site http://www.partysite-badens.de/neu/Kopievonpartybilder.html (http://www.partysite-badens.de/neu/Kopievonpartybilder.html)
My next troubleshooting steps would be to remove ALL javascripts except the facebooks from the page and see if you are have a compatibility issue between them all

UPDATE
Please see the added code I added on step #4. The iframe version of the like button may work for you...

@comicart,
If you have clicked on the link before, I do know that facebook caches it information so it does not have to query your site so much. I think I remember it saying 24hr before the cache flushes.
The only way to force it to flush for a single page it to place the link to the details page of that image in the linter and then it pulls up all the info it finds on that page.
http://developers.facebook.com/tools/lint/ (http://developers.facebook.com/tools/lint/)
Also, the like button now does the posting also, I have noticed it may take an extra second to come up but when you hover over the grayed out like button the post with comment apears. I hope faceboko speeds that up because, like you, I did not know it did it.
Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on April 18, 2011, 04:38:17 AM
i have one problem of this mod

i complete the steps right.

but the thumbnails image not appear on facebook?

only appear the icon of download.

this my site:
http://www.daralaujam.com/gallery/
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 18, 2011, 12:13:11 PM
i have one problem of this mod

i complete the steps right.

but the thumbnails image not appear on facebook?

only appear the icon of download.

this my site:
http://www.daralaujam.com/gallery/

I do not see step 2.b anywhere in your header of your pages...
Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on April 18, 2011, 01:35:14 PM
i have one problem of this mod

i complete the steps right.

but the thumbnails image not appear on facebook?

only appear the icon of download.

this my site:
http://www.daralaujam.com/gallery/

I do not see step 2.b anywhere in your header of your pages...

i added step 2.b but:
1- the like button in old images not work fine.
2- like button in new images still give download icon on facebook thumb.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 18, 2011, 03:54:09 PM
@ Mailoo,

Delete this code from your header file
Code: [Select]
<meta property="fb:admins" content="YOUR FACEBOOK ADMIN IDS"/> <!-- delete if not used-->
<meta property="fb:app_id" content="YOUR FACEBOOK APPLICATION ID"/> <!-- delete if not used-->

also in your header file you have 2 <html> tags, not sure if causing problems,
Code: [Select]
<html dir="rtl">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html dir="rtl" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

Change to
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html dir="rtl" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

see what that does, I do know facebook is picky about the dimensions of the thumbnails, not sure if that is your problem.
go to http://developers.facebook.com/tools/lint/ (http://developers.facebook.com/tools/lint/) and type in the path to one of your detail pages. That will tell you what facebook sees on their end.

Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on April 18, 2011, 05:05:21 PM
@ Mailoo,

Delete this code from your header file
Code: [Select]
<meta property="fb:admins" content="YOUR FACEBOOK ADMIN IDS"/> <!-- delete if not used-->
<meta property="fb:app_id" content="YOUR FACEBOOK APPLICATION ID"/> <!-- delete if not used-->

also in your header file you have 2 <html> tags, not sure if causing problems,
Code: [Select]
<html dir="rtl">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html dir="rtl" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

Change to
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html dir="rtl" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">

see what that does, I do know facebook is picky about the dimensions of the thumbnails, not sure if that is your problem.
go to http://developers.facebook.com/tools/lint/ (http://developers.facebook.com/tools/lint/) and type in the path to one of your detail pages. That will tell you what facebook sees on their end.



this is header file on my site: attachment.
can you help me plz.
there is no change after edit
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 18, 2011, 05:36:07 PM
@ Mailoo,

Attached is a screenshot of what I am getting. I can not read your language so I am hoping it is correct. The thumbnail on the top on did have that download button. I had to put that link in facebook's linter  http://developers.facebook.com/tools/lint/ (http://developers.facebook.com/tools/lint/) to force it to check the thumbnail again.
When facebook first looks at your link, it caches what it finds so it does not have to look at it all the time. If you remember which items had the download button showing, you need to place the links to the detail pages of those images in the lint so it will refresh the cache, or you can wait 24hr for facebook to recache your pages.

You may want to look at the header again, I saw some things missing in it.
on step 2.b make sure you place everything in your header file except the facebookIDs and facebookAdmins lines that I told you to remove in the last post.
Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on April 18, 2011, 05:41:19 PM
but the like button on this page for example:
still not work:
http://daralaujam.com/gallery/cat214.htm


sorry..
this is an attachmen file:

update:
now work fine :)
this is last edit of header file:

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html dir="{direction}" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">


<head>

<title>{site_name}</title>

{if page_details}
<meta property="og:url" content="{fb_url}"/>
<meta property="og:title" content="{facebook_title}"/>
<meta property="og:image" content="{facebook_image}"/>
{endif page_details}

<meta http-equiv="content-type" content="text/html; charset={charset}" />

<link rel="stylesheet" href="{template_url}/style.css" />

{if has_rss}

<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}" />

{endif has_rss}

</head>

<body bgcolor="#E9E9E9" text="#050505" link="#E54F00" vlink="#E54F00" alink="#E54F00">
<style>
<!--
A:link {text-decoration: none; color: }
A:visited {text-decoration: none; color: }
A:active {text-decoration: none; color: }
A:hover {text-decoration: none; color: }
-->
</style>
Title: Re: [MOD] Facebook like/share/send button
Post by: thomseye on April 20, 2011, 05:49:11 PM
I hate to ask for help.  I really tried everything to remedy this issue by following instructions and then following a fix that was similar to the problem I'm having.

What I have is - when clicking on the "LIKE" button, is a brief white-looking small pop-up that disappears before anything happens... before I can type into a window.  So essentially, I click the "LIKE" button and it adds a "1" to the button, then goes back to just a "LIKE" button.  Facebook doesn't recognize the "LIKE" either.

I know this isn't right.  Can you tutor me a bit here?

Code: [Select]
My site URL is http://www.richardhasawebsite.com
Be aware that my site is adult only.

Thank you so much and sorry for needing your time!

HEADER.HTML
Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{direction}" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<title>{prepend_head_title}{site_name}</title>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<meta property="og:type" content="website"/>
<meta property="og:site_name" content="{site_name}"/>
{if page_details}
<meta property="og:url" content="{fb_url}"/>
<meta property="og:title" content="{facebook_title}"/>
<meta property="og:description" content="{detail_meta_description}"/>
<meta property="og:image" content="{facebook_image}"/>
{endif page_details}
<meta http-equiv="content-type" content="text/html; charset={charset}">
<meta name="description" content="{detail_meta_description}{site_name}">
<meta name="keywords" content="{detail_meta_keywords}">
<meta name="robots" content="index,follow">
<meta name="revisit-after" content="10 days">
<meta http-equiv="imagetoolbar" content="no">
<link rel="stylesheet" href="{template_url}/style.css" type="text/css">
<link rel="shortcut icon" href="{home_url}favicon.ico">
<script type="text/javascript" src="http://cdn.sublimevideo.net/js/fubl7o4t.js"></script>
<script language="javascript" type="text/javascript">
<!--

  var captcha_reload_count = 0;
var captcha_image_url = "{url_captcha_image}";
  function new_captcha_image() {
    if (captcha_image_url.indexOf('?') == -1) {
 document.getElementById('captcha_image').src= captcha_image_url+'?c='+captcha_reload_count;
} else {
 document.getElementById('captcha_image').src= captcha_image_url+'&c='+captcha_reload_count;
}

    document.getElementById('captcha_input').value="";
    document.getElementById('captcha_input').focus();
    captcha_reload_count++;
  }

function opendetailwindow() {
    window.open('','detailwindow','toolbar=no,scrollbars=yes,resizable=no,width=680,height=480');
  }
  
  function right(e) {
    if ((document.layers || (document.getElementById && !document.all)) && (e.which == 2 || e.which == 3)) {
      alert("© Copyright by {site_name}");
      return false;
    }
    else if (event.button == 2 || event.button == 3) {
      alert("© Copyright by {site_name}");
      return false;
    }
    return true;
  }

  if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = right;
  }
  else if (document.all && !document.getElementById){
    document.onmousedown = right;
  }

document.oncontextmenu = new Function("alert('© Copyright by {site_name}');return false");

// -->
</script>
{if has_rss}
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}">
{endif has_rss}
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-21694612-5']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script></head>
<body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475"><table bgcolor="#e1e1e1" align="center" width="960" cellpadding="0" cellspacing="0">
<tr><td style="text-align: center"><a href="http://join.mrskin.com/track/NTI2MTg6Mzox/top10-2010" target="_blank">
<img src="http://images.mrskincash.com/top10_2010_728x90.jpg" width="728" height="90" border=0" style="vertical-align: middle; border-style: solid; border-width: 2px"></a><br><br><!-- Begin: Black Label Ads, Generated: 2011-04-09 22:39:18  -->
<script type="text/javascript">
var AdBrite_Title_Color = '447C9A';
var AdBrite_Text_Color = '000000';
var AdBrite_Background_Color = 'E1E1E1';
var AdBrite_Border_Color = '004C75';
var AdBrite_URL_Color = 'B91111';
try{var AdBrite_Iframe=window.top!=window.self?2:1;var AdBrite_Referrer=document.referrer==''?document.location:document.referrer;AdBrite_Referrer=encodeURIComponent(AdBrite_Referrer);}catch(e){var AdBrite_Iframe='';var AdBrite_Referrer='';}
</script>
<span style="white-space:nowrap;"><script type="text/javascript">document.write(String.fromCharCode(60,83,67,82,73,80,84));document.write(' src="http://ads.adbrite.com/mb/text_group.php?sid=1907181&zs=3732385f3930&ifr='+AdBrite_Iframe+'&ref='+AdBrite_Referrer+'" type="text/javascript">');document.write(String.fromCharCode(60,47,83,67,82,73,80,84,62));</script>
<a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1907181&afsid=55544"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard-w.gif" style="background-color:#004C75;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span>
<!-- End: Black Label Ads --><br><br>
</td></tr>
Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on April 20, 2011, 06:12:35 PM
I hate to ask for help.  I really tried everything to remedy this issue by following instructions and then following a fix that was similar to the problem I'm having.

What I have is - when clicking on the "LIKE" button, is a brief white-looking small pop-up that disappears before anything happens... before I can type into a window.  So essentially, I click the "LIKE" button and it adds a "1" to the button, then goes back to just a "LIKE" button.  Facebook doesn't recognize the "LIKE" either.

I know this isn't right.  Can you tutor me a bit here?

Code: [Select]
My site URL is http://www.richardhasawebsite.com
Be aware that my site is adult only.

Thank you so much and sorry for needing your time!

That's one of the reasons I changed mine to a "Share" button.
T
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 21, 2011, 02:21:36 AM
@thomseye and everyone else with same issue,
Don't feel bad asking for help, this is how I know something is wrong. I think I know what the problem is but I need to do some more testing this weekend before I know for certain.

Everyone hold tight and I will post what I find. It is suppose to rain all weekend so I should have plenty of time to work on it.

PS: I am regretting ever starting with facebook connectors  :lol:
They need better documentation and help. I am learning more from other programmers that are having the same problems then I ever did with facebooks help area.
But I think I am onto something...
Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on April 21, 2011, 04:49:51 AM
Thanks for all your hard work Buddy.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 24, 2011, 08:39:32 PM
Here is my Facebook adventure in a nutshell...

Even though it does not state in the documentation that you have to have an application setup on facebook to have a Like button,
from all the people I have talked with and other sites I looked over that seem to be working correctly,
You DO have to create an application on Facebook's website to get the Like button to work correctly.
That being said, Version 3 of this mod now has this built in and all my testing has been successfull and I even have added a new feature to it.

How do you create an application on Facebook?
It isn't that difficult, but they do now require that you are verified user to do it.
You will either need to give them your credit card # or cell phone #.
I did the cell phone route and then just turned off all notifactions going to my cell phone, so it won't be going aff all day long.
After I did that setting up the application was easy...
Go to this link
http://www.facebook.com/developers/createapp.php (http://www.facebook.com/developers/createapp.php)
Give your application a name.
In the set up page you have different fields to enter, but only these are needed
Click on the "website" menu option on the left.
"Site url", you should enter the root of your gallery, for the example: "http://www.yourwebsite.com/gallery/" (Don't forget the last / )
"Site Domain", you should enter the root of your site, for the example: "yourwebsite.com"
Take note of the "application ID", (write down or be ready to copy this information)
and save everything and your application should be ready.
You can create multiple applications under one user account, so you can do this for multiple domains that you are running.
One thing, if you are listed as an admin for the pages, you may see something different posted when you like a page, you will see a link to an admin page to do more things to your pages. Not sure of its purpose yet, but I had to create another account that I could use for testing to make sure the likes are posted correctly for normal users.

Bugs, Bugs, Bugs...
Of course there are a few bugs that you may run into using the like button on your site.
Here are a couple that I know about in case they start happening to you,
They all seem to be Internet Explorer related
1. On IE6,IE7,IE8(compatability mode) all seem to keep refreshing the webpage till the browser crashes. I do know Facebook is looking into it.
2. On IE browsers the popup comment window sometimes does not render correclty
   (post button chopped off at bottom)
   (Window does not go away after posting)
   So far they are saying to user the "standard" layout for the like button with a width of 450 (not good for category pages, but OK for detail pages)
3. If you have multiple Admins listed for a page, only the first admin can actually admin the page. Facebook is aware of this.

With all that being said, Please load up version 3 of my mod and let me know how it is working for you...
Title: Re: [MOD] Facebook like/share/send button
Post by: Sunny C. on April 24, 2011, 09:46:19 PM
German Language
Code: [Select]
//[MOD] Facebook like button
/*-- Setting-Group Facebook --*/
$setting_group["facebook"]="Facebook Optionen";
$setting['fb_appid'] = "Geben Sie hier die Anwendungs-ID ein, die Sie auf <a href=\"http://wiki.developers.facebook.com/index.php/Connect/Setting_Up_Your_Site\">Facebook</a> erhalten haben.";
$setting['fb_admins'] = "Liste der Facebook-IDs der Admins<br><span class=\"smalltext\">IDs durch Komma trennen</span>";
$setting['fb_main_url'] = "Vollständiger Pfad zu Ihrer Webseite<br><span class=\"smalltext\">Die URL, die Sie auf Facebook angegeben haben</span>";
$setting['fb_image'] = "Vollständiger Pfad zu Ihrem Logo";
$setting['fb_title'] = "Geben Sie hier den Titel ihrer Seite ein. Mit dieser Option werden sämtliche Seitentitel überschrieben. Wird das Feld leer gelassen, wird der normale Titel-Tag ausgelesen.";
$setting['fb_description'] = "Geben Sie hier die Beschreibung Ihrer Webseite ein<br><span class=\"smalltext\">HTML code wird automatisch entfernt</span>";
$setting['fb_language'] = "Wählen Sie hier Ihre Sprache aus";
$fb_language_optionlist = array(
'ca_ES' => 'Catalan',
'cs_CZ' => 'Czech',
'cy_GB' => 'Welsh',
'da_DK' => 'Danish',
'de_DE' => 'German',
'eu_ES' => 'Basque',
'en_PI' => 'English (Pirate)',
'en_UD' => 'English (Upside Down)',
'ck_US' => 'Cherokee',
'en_US' => 'English (US)',
'es_LA' => 'Spanish',
'es_CL' => 'Spanish (Chile)',
'es_CO' => 'Spanish (Colombia)',
'es_ES' => 'Spanish (Spain)',
'es_MX' => 'Spanish (Mexico)',
'es_VE' => 'Spanish (Venezuela)',
'fb_FI' => 'Finnish (test)',
'fi_FI' => 'Finnish',
'fr_FR' => 'French (France)',
'gl_ES' => 'Galician',
'hu_HU' => 'Hungarian',
'it_IT' => 'Italian',
'ja_JP' => 'Japanese',
'ko_KR' => 'Korean',
'nb_NO' => 'Norwegian (bokmal)',
'nn_NO' => 'Norwegian (nynorsk)',
'nl_NL' => 'Dutch',
'pl_PL' => 'Polish',
'pt_BR' => 'Portuguese (Brazil)',
'pt_PT' => 'Portuguese (Portugal)',
'ro_RO' => 'Romanian',
'ru_RU' => 'Russian',
'sk_SK' => 'Slovak',
'sl_SI' => 'Slovenian',
'sv_SE' => 'Swedish',
'th_TH' => 'Thai',
'tr_TR' => 'Turkish',
'ku_TR' => 'Kurdish',
'zh_CN' => 'Simplified Chinese (China)',
'zh_HK' => 'Traditional Chinese (Hong Kong)',
'zh_TW' => 'Traditional Chinese (Taiwan)',
'fb_LT' => 'Leet Speak',
'af_ZA' => 'Afrikaans',
'sq_AL' => 'Albanian',
'hy_AM' => 'Armenian',
'az_AZ' => 'Azeri',
'be_BY' => 'Belarusian',
'bn_IN' => 'Bengali',
'bs_BA' => 'Bosnian',
'bg_BG' => 'Bulgarian',
'hr_HR' => 'Croatian',
'nl_BE' => 'Dutch (België)',
'en_GB' => 'English (UK)',
'eo_EO' => 'Esperanto',
'et_EE' => 'Estonian',
'fo_FO' => 'Faroese',
'fr_CA' => 'French (Canada)',
'ka_GE' => 'Georgian',
'el_GR' => 'Greek',
'gu_IN' => 'Gujarati',
'hi_IN' => 'Hindi',
'is_IS' => 'Icelandic',
'id_ID' => 'Indonesian',
'ga_IE' => 'Irish',
'jv_ID' => 'Javanese',
'kn_IN' => 'Kannada',
'kk_KZ' => 'Kazakh',
'la_VA' => 'Latin',
'lv_LV' => 'Latvian',
'li_NL' => 'Limburgish',
'lt_LT' => 'Lithuanian',
'mk_MK' => 'Macedonian',
'mg_MG' => 'Malagasy',
'ms_MY' => 'Malay',
'mt_MT' => 'Maltese',
'mr_IN' => 'Marathi',
'mn_MN' => 'Mongolian',
'ne_NP' => 'Nepali',
'pa_IN' => 'Punjabi',
'rm_CH' => 'Romansh',
'sa_IN' => 'Sanskrit',
'sr_RS' => 'Serbian',
'so_SO' => 'Somali',
'sw_KE' => 'Swahili',
'tl_PH' => 'Filipino',
'ta_IN' => 'Tamil',
'tt_RU' => 'Tatar',
'te_IN' => 'Telugu',
'ml_IN' => 'Malayalam',
'uk_UA' => 'Ukrainian',
'uz_UZ' => 'Uzbek',
'vi_VN' => 'Vietnamese',
'xh_ZA' => 'Xhosa',
'zu_ZA' => 'Zulu',
'km_KH' => 'Khmer',
'tg_TJ' => 'Tajik',
'ar_AR' => 'Arabic',
'he_IL' => 'Hebrew',
'ur_PK' => 'Urdu',
'fa_IR' => 'Persian',
'sy_SY' => 'Syriac',
'yi_DE' => 'Yiddish',
'gn_PY' => 'Guaraní',
'qu_PE' => 'Quechua',
'ay_BO' => 'Aymara',
'se_NO' => 'Northern Sámi',
'ps_AF' => 'Pashto',
'tl_ST' => 'Klingon'
);
//END [MOD] Facebook like button
Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on April 27, 2011, 02:46:00 AM
Nice, But

if i like the main site it show the url of site?

i want show the title name of site.

http://daralaujam.com/gallery/

you can see like link above on right.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on April 27, 2011, 03:10:17 PM
Nice, But

if i like the main site it show the url of site?

i want show the title name of site.

http://daralaujam.com/gallery/

you can see like link above on right.

Recheck step #1 and 2b, the code has changed for version 3 that should have taken care of that. Or you can zip your changed files and I can take a look at them for you...
Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on May 01, 2011, 02:25:22 AM
Nice, But

if i like the main site it show the url of site?

i want show the title name of site.

http://daralaujam.com/gallery/

you can see like link above on right.

Recheck step #1 and 2b, the code has changed for version 3 that should have taken care of that. Or you can zip your changed files and I can take a look at them for you...

plz check an attachment files,
tanx
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on May 01, 2011, 08:19:40 PM
@ Mailoo,
It looks like everything is correct...
The only leftover code I saw was in your header.html file
remove
Code: [Select]
{endif page_details}
Also, since you are not using the facebook admins, you may want to also remove from the header.html file
Code: [Select]
<meta property="fb:admins" content="{fb_admins}"/>
I will be making a change to not place that admin info in the header if it is blank. I saw some people complaining about it on Facebook's boards.

The meta properties seem to be correct now so your main link should be now correct.
Title: Re: [MOD] Facebook like/share/send button
Post by: comicart on May 01, 2011, 08:48:28 PM
So...
What's wrong with continuing to use version 2.0?
It works for me.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on May 02, 2011, 12:11:04 AM
So...
What's wrong with continuing to use version 2.0?
It works for me.
The only thing that version 3 gives you that 2 did not was if you were going to have a like button for your main website and not the thumbnails.
When the code was rendered in version 2, it would give garbage for the main site link unless you were in the details page.
Version 3 now renders the header info for your main site on all pages except the details page so your main like button will work for your site, but if you do not have one then version 2 should still be fine.
Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on May 02, 2011, 04:51:34 AM
mr. budduke

thank you very much, for your hard work :)

can you plz see the attachment image. :)

(http://daralaujam.com/upload/uploads/daralaujam13044100951.jpg)
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on May 03, 2011, 02:07:47 AM
@ mailoo,
You are requesting that the Category name will be diplayed for the image description instead of the image description. That would take a different sql call to make that happen. Not sure if anyone else would want that or not so I am posting the change here for anyone who is interested.

Replace the insert you did in Step #1 with this code and it should change it for you...
Code: [Select]
//[MOD] Facebook Like Button
if ($array["details"]){
$sql = "SELECT i.image_name, i.cat_id, i.image_media_file, i.image_description, c.cat_name
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
WHERE i.image_id = $image_id AND i.cat_id = c.cat_id AND image_active = 1";
$image_row = $site_db->query_firstrow($sql);
$facebook['image'] = get_file_path($image_row['image_media_file'], "thumb", $image_row['cat_id'], 0, 1);
$facebook['image'] = $script_url.substr($facebook['image'],1);
$facebook['title'] = $image_row['image_name'];
$facebook['type'] = "article";//this is what facebook says images should be filed under
$facebook['description'] = !empty($image_row['cat_name']) ? strip_tags($image_row['cat_name']) : "";
$facebook['url1'] = $site_sess->url($script_url."/".$self_url);
if (strpos($facebook['url1'],"&")){
$facebook['url1']=substr($facebook['url1'],0,strpos($facebook['url1'],"&"));
}
}
else{
$facebook['image'] = $config['fb_image'];
$facebook['title'] = $config['fb_title'];
$facebook['type'] = "website";// types setting for your default website
$facebook['description'] = strip_tags($config['fb_description']);
$facebook['url1'] = $config['fb_main_url'];
}
$facebook['main_url']= $config['fb_main_url'];
$site_template->register_vars(array(
"fb_title" => $facebook['title'],
"fb_image" => $facebook['image'],
"fb_type" => $facebook['type'],
"fb_desc" => $facebook['description'],
"fb_url1" => $facebook['url1'],
"fb_main_url" => $facebook['main_url'],
"fb_appid" => $config['fb_appid'],
"fb_admins" => $config['fb_admins'],
"fb_language" => ($lang['fb_language']) ? $lang['fb_language'] : $config['fb_language']
)
);
unset($facebook, $image_row);
//END [MOD] Facebook Like Button
Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on May 03, 2011, 10:05:53 AM
yaaa wow great work my friend :)

your code is correct but, i make small edit to work 100%

you forget this line:
Code: [Select]
$facebook['title'] = $image_row['image_name'];
should be change to:
Code: [Select]
$facebook['title'] = $image_row['cat_name'];
and a right final code:
Code: [Select]
//[MOD] Facebook Like Button
if ($array["details"]){
$sql = "SELECT i.image_name, i.cat_id, i.image_media_file, i.image_description, c.cat_name
FROM (".IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
WHERE i.image_id = $image_id AND i.cat_id = c.cat_id AND image_active = 1";
$image_row = $site_db->query_firstrow($sql);
$facebook['image'] = get_file_path($image_row['image_media_file'], "thumb", $image_row['cat_id'], 0, 1);
$facebook['image'] = $script_url.substr($facebook['image'],1);
$facebook['title'] = $image_row['cat_name'];
$facebook['type'] = "article";//this is what facebook says images should be filed under
$facebook['description'] = !empty($image_row['cat_name']) ? strip_tags($image_row['cat_name']) : "";
$facebook['url1'] = $site_sess->url($script_url."/".$self_url);
if (strpos($facebook['url1'],"&")){
$facebook['url1']=substr($facebook['url1'],0,strpos($facebook['url1'],"&"));
}
}
else{
$facebook['image'] = $config['fb_image'];
$facebook['title'] = $config['fb_title'];
$facebook['type'] = "website";// types setting for your default website
$facebook['description'] = strip_tags($config['fb_description']);
$facebook['url1'] = $config['fb_main_url'];
}
$facebook['main_url']= $config['fb_main_url'];
$site_template->register_vars(array(
"fb_title" => $facebook['title'],
"fb_image" => $facebook['image'],
"fb_type" => $facebook['type'],
"fb_desc" => $facebook['description'],
"fb_url1" => $facebook['url1'],
"fb_main_url" => $facebook['main_url'],
"fb_appid" => $config['fb_appid'],
"fb_admins" => $config['fb_admins'],
"fb_language" => ($lang['fb_language']) ? $lang['fb_language'] : $config['fb_language']
)
);
unset($facebook, $image_row);
//END [MOD] Facebook Like Button
Title: Re: [MOD] Facebook like/share/send button
Post by: mailoo on May 06, 2011, 03:31:02 AM
Mr. budduke
thank u 4 this mod. great work :)

Also you can add this code anywhere in details.html
Code: [Select]
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:comments href="http://domain.com/gallery/img{image_id}.htm" num_posts="2" width="500"></fb:comments>replace domain.com with your domain link.

that code allow users to add comments to images in your gallery by using Facebook account.
Title: Re: [MOD] Facebook like/share/send button
Post by: Michi26 on June 12, 2011, 08:28:24 PM
Hello,

now i had the free time to test it with the version 3.0.

I hope you remember me...i had the problem with the iframe. I have done the completely steps, but the problem is still there:-( You can see the "like-Button" or the "Gefällt mir"-Button in german. But if you click on this button, you can not give a comment and the image doesn´t appears on the facebook HP.

I hope you find the problem and can help me...

Her is my Link:http://www.partysite-badens.de/neu/partybilder.html

Thank you...
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on June 18, 2011, 12:48:48 AM
Regarding Michi26 problem,
the site has the gallery inside of an iframe and something was getting lost in the javascript between the iframes...
it seems the share button worked better the the like button in this instince

I posted this in case anyone else is have the same kind of issue with the mod
Title: Re: [MOD] Facebook like/share/send button
Post by: chamkani.net on July 18, 2011, 03:27:29 PM
Well it works fine for my website.
but i face a problem now

that my site is converted into SEO URL where before applying this mod the title was accurate (image name as title)

Now the title is removed with url like http://mysite.com/blah blah

What to do?
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on July 18, 2011, 08:14:32 PM
Well it works fine for my website.
but i face a problem now

that my site is converted into SEO URL where before applying this mod the title was accurate (image name as title)

Now the title is removed with url like http://mysite.com/blah blah

What to do?

The only title involved in the header file is the og:title tag which I believe does not override the main title displayed on the page.
Can you send me your header.html file so I can take a look at it?
Title: Re: [MOD] Facebook like/share/send button
Post by: jeyjoo on July 25, 2011, 11:42:04 PM
This message has been deleted by Rembrandt as spam!
Title: Re: [MOD] Facebook like/share/send button
Post by: SilverShadow on September 16, 2011, 01:23:58 AM
First lemme thank you for your great efforts, appreciated
There's something that I really can't understand, and its about creating an app on Facebook "FB connect" !! is it a must to get the like/share mod working ?!
Title: Re: [MOD] Facebook like/share/send button
Post by: zimba on October 15, 2011, 03:04:42 AM
First - Thanks 4 the MOD - works perfekt on "all good" Browsers!

Only the S*** F***** IE dont display the FB-Buttons and the FB-Comments.
Perhaps someone have a idea how to fix.


The "IE Develop Tool" shows me the JS-Debugger when i will start the Webpage:
Code: [Select]
document.getElementById(...) is 0 or not a object[/color]

I found this in the header.html script...
Code: [Select]
<script>
  window.fbAsyncInit = function() {
    FB.init({appId: '{fb_appid}', status: true, cookie: true,
             xfbml: true});
  };
  (function() {
  var e = document.createElement('script'); e.async = true;
    e.src = document.location.protocol +
      '//connect.facebook.net/{fb_language}/all.js';
    document.getElementById('fb-root').appendChild(e);
  }());
</script>


and then when i look inside the "IE Develop Tool" it tells me the Problem would be in "Line 117 Sign 5"
Code: [Select]
  var e = document.createElement('script'); e.async = true;

IE is something like a BadDayBrowser...  :roll:

Perhaps someone knows what to do. Thanks

Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on October 16, 2011, 12:20:55 AM
@zimba,
I use IE all the time, seldon use anything else unless testing sites.
Which version of IE are you using?
Can you give a link to see what is happening?
Can you post a pic of what is being displayed?
I have found by placing facebook stuff inside of a <div></div> sometimes helps with weird things
Title: Re: [MOD] Facebook like/share/send button
Post by: wooody on October 19, 2011, 09:18:32 AM
Hello , I just follow this post
http://www.4homepages.de/forum/index.php?topic=29422.0

and i did all , and works fine just one problem when click on Like it's should display the image also in facebook, but it's display no preview available
xxx: xxx: logopub. net/img-amd-64-athlon-9. htm


any help.

Thanks
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on October 19, 2011, 11:44:48 AM
Hello , I just follow this post
http://www.4homepages.de/forum/index.php?topic=29422.0

and i did all , and works fine just one problem when click on Like it's should display the image also in facebook, but it's display no preview available
xxx: xxx: logopub. net/img-amd-64-athlon-9. htm


any help.

Thanks

I did not see any facebook like buttons on this link you sent...
Title: Re: [MOD] Facebook like/share/send button
Post by: zimba on October 19, 2011, 12:21:17 PM
@budduke

now i have install the MOD in the next 4images Gallery-Project - there it works perfekt !

In the old one, where it not work, i forget to run the "....-facebook.php" file. So i
run this "after" the Code-MODs... Perhaps this is the Problem.

Is it a opinion to remove the MOD and make it new? Do you think it would be promising ?
Or should i search for the solution?

Title: Re: [MOD] Facebook like/share/send button
Post by: wooody on October 19, 2011, 07:23:20 PM
I did not see any facebook like buttons on this link you sent...

Thanks a lot for you kind reply, i just remove it after i install it. I will repeat it today and will wait your help.

Thank you

Hello Dear budduke  , it's Ready now , please if you can visit it here and check .

1. Click on any image , you can see in your facebook there is " no preview available image"
always this
<meta property="og:image" content="http://logopub.net/templates/logotheque/icons/404.gif"/>


waiting your reply,
Thank you

Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on October 20, 2011, 12:40:51 AM
@ wooody,
Redo Step #1. I think I overlooked something in that code. I made a change to it.

the like/unlike seemed to work for me. it did not change back till I told it to. I am using IE9
Title: Re: [MOD] Facebook like/share/send button
Post by: wooody on October 20, 2011, 09:07:06 AM
@ wooody,
Redo Step #1. I think I overlooked something in that code. I made a change to it.

the like/unlike seemed to work for me. it did not change back till I told it to. I am using IE9

Yes your right,
IE7, Chrome  Image shown fine but the like become unlike automatically ,
and in Firefox image not shown and unlike become auto also.
 
can u give me your code in budduke site.

Thank you


Thanks a lot budduke , i appreciate your support and help for us,
now it's works fine , i just clear cache for browsers.

Thanks again.
Title: Re: [MOD] Facebook like/share/send button
Post by: chamkani.net on December 29, 2011, 08:36:42 PM
When i like a thumbnail, it does'nt shows any image in facebook.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on December 29, 2011, 09:16:37 PM
When i like a thumbnail, it does'nt shows any image in facebook.

Can you post or PM a link for me to see in action?
Title: Re: [MOD] Facebook like/share/send button
Post by: chamkani.net on December 30, 2011, 03:44:27 AM
Sure

http://pukhtoogle.com/gallery



1 thing more in the following Spanish gallery, this problem starts when i install the mod, what is the problem causing this

Quote
�Iniciar sesi�n autom�ticamente en la siguiente visita?

http://www.retratando.com/galeria/index.php
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on December 30, 2011, 04:57:43 PM
1 thing more in the following Spanish gallery, this problem starts when i install the mod, what is the problem causing this

Quote
�Iniciar sesi�n autom�ticamente en la siguiente visita?

http://www.retratando.com/galeria/index.php

I think this is how the pages are being incoded...
please read my post on my other mod that explains what should fix it. I am not sure if you have to do all the steps or just try each one, one at a time, to see what fixes your issue.
http://www.4homepages.de/forum/index.php?topic=27396.msg158045#msg158045 (http://www.4homepages.de/forum/index.php?topic=27396.msg158045#msg158045)

Let me know if you can't get anywhere with it.
Title: Re: [MOD] Facebook like/share/send button
Post by: sasma on December 31, 2011, 09:57:37 AM
Hello,
I use version 1.7.10 MOD to do, I can not find a link variable trumb file photo. Having commented on a photograph to appear in facebook with your photo, it still appears in facebook but does not go that picture is discussed please help me.

Code: [Select]
<meta property="fb:app_id" content="208093492607286"/>
<meta property="fb:admins" content="yunsa"/>
<meta property="og:type" content="{fb_type}"/>
<meta property="og:site_name" content="{site_name}"/>
<meta property="og:url" content="{fb_url1}"/>
<meta property="og:title" content="{image_name}"/>
<meta property="og:description" content=""/>
<meta property="og:image" content="?????????????????????????????????????????????"/>


details.php file is added that



Code: [Select]
<div align="center">




<p><fb:like></fb:like></p><br />
    <div id="fb-root"></div>
    <script>
      window.fbAsyncInit = function() {
        FB.init({appId: "208093492607286", status: true, cookie: true,
                xfbml: true});
      };
      (function() {
        var e = document.createElement("script");
        e.type = "text/javascript";
        e.src = document.location.protocol +
          "//connect.facebook.net/bg_BG/all.js";
        e.async = true;
        document.getElementById("fb-root").appendChild(e);
      }());
    </script>
    <div id="fb-root"></div>
<script src="http://connect.facebook.net/bg_BG/all.js#appId=208093492607286&amp;xfbml=1"></script>
<fb:comments href="http://www.gotinisnimki.com/details.php?image_id=<?php echo $image_id?>" num_posts="3" width="500"></fb:comments>







</div>
Title: Re: [MOD] Facebook like/share/send button
Post by: chamkani.net on December 31, 2011, 10:18:57 AM
Quote
I think this is how the pages are being incoded...
please read my post on my other mod that explains what should fix it. I am not sure if you have to do all the steps or just try each one, one at a time, to see what fixes your issue.
http://www.4homepages.de/forum/index.php?topic=27396.msg158045#msg158045 (http://www.4homepages.de/forum/index.php?topic=27396.msg158045#msg158045)

Let me know if you can't get anywhere with it.

Yeah exactly, i have replaced the header.html with the old one, the site work perfectly but facebook mode is not working as the header does'nt consists of any changes for facebook mode.
When i start making any changes and save it, it against starts accent spanish error.
So let me know how to save this file with its correct type.
Whether i have to save it using UTF-8 or Unicode or anything else to be work properly..
Title: Re: [MOD] Facebook like/share/send button
Post by: Jan-Lukas on December 31, 2011, 02:33:40 PM
ich habe auch Probleme es in der 1.7.10 einzubauen, die Buttons werden bei einem Klick alle als bewertet angezeigt.
Der Mod sollte mal im ersten Posting sortiert werden, da ist einiges durcheinander (für nicht englisch sprechende)


LG und einen guten Übergang
Harald
Title: Re: [MOD] Facebook like/share/send button
Post by: kubiczek on December 31, 2011, 02:47:56 PM
Version 3 Works Perfect :D

see: http://www.grosspeterwitz.de/gp/details.php?image_id=4637&l=deutsch
Title: Re: [MOD] Facebook like/share/send button
Post by: Jan-Lukas on December 31, 2011, 03:45:17 PM
dann sollte man mal version 3 von 2 trennen, dann hat auch ein User mit weniger englisch Kenntnissen die Möglichkeit das zu installieren.
Glaube ja das es funktioniert, nur ist es unübersichtlich

LG
Title: Re: [MOD] Facebook like/share/send button
Post by: kubiczek on December 31, 2011, 05:04:50 PM
Hallo,

Step 1 make problem,

when i make step 1, i can not edit picure in Admin Panel.

Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on December 31, 2011, 07:10:33 PM
Hallo,

Step 1 make problem,

when i make step 1, i can not edit picure in Admin Panel.

wow, a few people chimed in at the same time...
@kubiczek,
I do not think the mod has anything to do with the admin panel as far as editing photos. I have tested it again on my test server and everything seems fine. If you are still seeing problems, PM me a link of your changed files zipped and I will look at them.

@chamkani.net,
Can you PM me a link of your changed files zipped so I can look at them. I may need more, but will look to see if I see anything. I changed my test server over to spanish and it seemed to be OK. so not sure what you are running into.

@Jan-Lukas,
Using google translate, not sure what your question is. The reason I have the changes the way they are is because the mod changed from version 1,2,to 3 and some things needed to be noted so you would not have to start over and replace everything, just the ones that needed to be changed. I am American and only speak English, so google translate has been my friend, but I would be the wrong person to make any translations for any of my mods. It would be interesting to know how they are changed when moved to a different language so I can post them in a better way for everyone. Feel free to PM me if you have any sugestions...
Title: Re: [MOD] Facebook like/share/send button
Post by: sasma on January 21, 2012, 02:28:12 PM
This mod work on version 1.7.10 ?

In my facebook earn another shot or.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on January 22, 2012, 12:19:56 AM
This mod work on version 1.7.10 ?

In my facebook earn another shot or.

Yes it does work with 1.7.10
I will be updating the code in the next few days so it works better with the New Login button mod that I will be posting, hopefully tomorrow.
So you may want to wait a couple of days and then install it so you don't have to redo anything.
Title: Re: [MOD] Facebook like/share/send button
Post by: chamkani.net on May 30, 2012, 04:20:54 PM
Which share/like/send and Comments mod is compatible with this version, i installed this mod and working perfectly, now i need like and comments as well.
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on May 30, 2012, 05:23:05 PM
Which share/like/send and Comments mod is compatible with this version, i installed this mod and working perfectly, now i need like and comments as well.

The version that is at the beginning of this mod should take care of the like. The comments, the only thing I did was add the facebook avatar to the comments already built into 4images and that is in this thread also.
It can be found here if you want to take a look at it...
http://www.4homepages.de/forum/index.php?topic=27396.msg149116#msg149116 (http://www.4homepages.de/forum/index.php?topic=27396.msg149116#msg149116)

If you are wanting to place facebook comments plugin. I have seen some sites doing it and it should install just fine after the like button mod is added.
You will need to modify the code in step 6 (see note on that step) to change it to 3 so it knows you are using both mods
Title: Re: [MOD] Facebook like/share/send button
Post by: son_gokou on May 29, 2013, 04:45:46 PM
Hello.

I want to share pictures and videos on facebook. I can share it, directly on facebook or using a button on 4images but sometimes a thumbnail don't appear.
What should I do?
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on May 30, 2013, 12:55:24 AM
Hello.

I want to share pictures and videos on facebook. I can share it, directly on facebook or using a button on 4images but sometimes a thumbnail don't appear.
What should I do?

Is your site online so I can see the problem in action?
If so, post or PM me links to the items that are not showing thumbnails...

Most of the time it is filetypes that facebook has issues with but would like to see what I see when I am looking at them.


UPDATE:
It seems that on this user's site, facebook was returning an error saying the thumbnail was too small to be used.
If you are using thumbnails that are smaller then 200X200 then you will not get thumbnails on your shares.
Title: Re: [MOD] Facebook like/share/send button
Post by: kangarooms on July 05, 2013, 03:36:58 PM
Hallo

leider ist mein englisch nicht wirklich gut... gibt es hier im Forum eine Deutsche Anleitung? Oder könnte mir jemand sagen wo ich einfinden könnt?
Title: Re: [MOD] Facebook like/share/send button
Post by: nobby on July 05, 2013, 03:47:39 PM
Hallo

leider ist mein englisch nicht wirklich gut... gibt es hier im Forum eine Deutsche Anleitung? Oder könnte mir jemand sagen wo ich einfinden könnt?

Hallo,

schau mal ober rechts  :wink: dort kannst Du den Translater benutzen.... English  :arrow: Deutsch, oder wie auch immer.

nobby
Title: Re: [MOD] Facebook like/share/send button
Post by: kangarooms on July 05, 2013, 09:28:51 PM
oh danke :D den habe ich nicht gesehen

dann mal schauen ob ich das hinbekomme
Title: Re: [MOD] Facebook like/share/send button
Post by: kangarooms on July 06, 2013, 08:16:45 PM
Hallo zusammen.

Habe mich jetzt hier etwas im Forum umgeschaut (auch schon gegooglet) aber nicht das richtige gefunden.

Ich würde gerne unter jedem Bild eine Facebook Like / share Button einbinden und ebenfalls die FB Kommentarbox.

Ich habe über FB developers zwar den Code gefunden, jedoch weiß ich nicht was ich genau machen muss / ändern / hinzufügen muss das jedes Bild einen eigenen Button / Kommentarbox hat.

Ich hoffe ich habe es nicht zu kompliziert erklärt und mir kann jemand helfen.

Ich nutze default_960px

LG & Danke schon mal  im Voraus
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on July 07, 2013, 12:54:30 AM
Hallo zusammen.

Habe mich jetzt hier etwas im Forum umgeschaut (auch schon gegooglet) aber nicht das richtige gefunden.

Ich würde gerne unter jedem Bild eine Facebook Like / share Button einbinden und ebenfalls die FB Kommentarbox.

Ich habe über FB developers zwar den Code gefunden, jedoch weiß ich nicht was ich genau machen muss / ändern / hinzufügen muss das jedes Bild einen eigenen Button / Kommentarbox hat.

Ich hoffe ich habe es nicht zu kompliziert erklärt und mir kann jemand helfen.

Ich nutze default_960px

LG & Danke schon mal  im Voraus

When you say you are wanting like button under each thumbnail... That should happen if you applied step 4 correctly. If you add the code to your thumbnail_bit.html it should display a like button under every thumbnail on your site correctly.
The fb comments I do not use but my untested guess would be to place the code from facebook's site in your details.html template where you are wanting it to be displayed and replace inside the code where is shows
Code: [Select]
href="http://example.com"replace that code with
Code: [Select]
href="{fb_url}"
let me know if you have any problems...
Title: Re: [MOD] Facebook like/share/send button
Post by: simbec on July 26, 2013, 09:11:27 PM
Sorry, aber ich blicke da nicht durch, das gemisch von version 2 und 3 ist sehr verwirrend. ich habe keinen plan was genau man tun muss damit es läuft.

Ist es möglich die neuste version für sich alleine zu stellen / posten?
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on July 27, 2013, 01:28:58 AM
Sorry, aber ich blicke da nicht durch, das gemisch von version 2 und 3 ist sehr verwirrend. ich habe keinen plan was genau man tun muss damit es läuft.

Ist es möglich die neuste version für sich alleine zu stellen / posten?

If you are a new install of this mod, then you just have to follow the steps on the first post and you should be good.
The reason I put the updated stuff in the steps was so current users could just go and replace what has changed in the mod and not the entire thing.
Hope that helps, If you are having issues installing it, PM me your changed files and I will compare them with a working version to find the mistakes.
Title: Re: [MOD] Facebook like/share/send button
Post by: simbec on July 28, 2013, 01:10:35 PM
I think I installed everything, but it does not work, there is no message at facebook
http://neb.topliste.org/images/
Title: Re: [MOD] Facebook like/share/send button
Post by: budduke on July 28, 2013, 07:53:57 PM
I think I installed everything, but it does not work, there is no message at facebook
http://neb.topliste.org/images/
It appears to post in facebook but something is missing in the metatags for your links...
<meta property="fb:app_id" content="146895985510883"/>
<meta property="fb:admins" content="237760596260197"/>
<meta property="og:type" content="article"/>
<meta property="og:site_name" content="FU @ Bear"/>
<meta property="og:url" content="http://neb.topliste.org/images/details.php"/>
<meta property="og:title" content="16sweettasteofbitter41"/>
<meta property="og:description" content="test. "/>
<meta property="og:image" content="http://neb.topliste.org/images/data/thumbnails/3785/16sweettasteofbitter41.png"/>

The red line should be reading...
<meta property="og:url" content="http://neb.topliste.org/images/details.php?image_id=13"/>
The ?image_id=XX is being removed from the metatags for your pages and that is why they are not being liked correctly.

If you can not figure it out send me the changed files by PM and I will look them over for you to see if I can find any mistakes.
Title: Re: [MOD] Facebook like/share/send button
Post by: simbec on July 28, 2013, 08:37:05 PM
did you get my pm?
Title: Re: [MOD] Facebook like/share/send button
Post by: dereiziger on April 09, 2017, 01:01:25 AM
I"m not sure what's happened. I went through the mod exactly as written but now everything on my site is jacked. When I load the page it's like the page has become a mirror of itself. Now, as soon as you hover over my menu everything goes haywire....



I have installed both the Facebook mods...  ;-(

http://globe-trekking.com/vg/gallery/details.php?image_id=56

I ended up removing all of the facebook connector information as well as everything from the header.html file that I had added and it works normally again.

I'm still unable to get a photo to show up when I post to facebook. It shows the images that are in my menu bar, however.  ;-\