Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 01-17-2015, 07:59 PM
compact compact is offline
 
Join Date: Jan 2003
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default sharing post on facebook - image/thumbnail?

Maybe it's an obvious answer, but whenever i share a thread on facebook from my forum, Facebook captures a thumbnail that appears to be magnified upclose to the point that it's ilegible. How can i manipulate as to what kind of thumbnail appears in the post?

I attached an image off google to give you guys an example of what thumbnail i'm talking about.

I am running 3.8

Thanks guys.
Attached Images
File Type: png facebook-via-newsfeed-post-2.png (54.0 KB, 0 views)
Reply With Quote
  #2  
Old 01-17-2015, 09:12 PM
blind-eddie's Avatar
blind-eddie blind-eddie is offline
 
Join Date: Apr 2006
Location: Michigan
Posts: 2,310
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you have more then one image on the thread you are sharing then you can select which image is shown on FB... other then that there is nothing you can do about it.
Reply With Quote
  #3  
Old 01-20-2015, 10:13 PM
compact compact is offline
 
Join Date: Jan 2003
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's unfortunate. Ok, thanks for the info.
Reply With Quote
  #4  
Old 01-21-2015, 01:04 AM
Digital Jedi's Avatar
Digital Jedi Digital Jedi is offline
 
Join Date: Oct 2006
Location: PopCulturalReferenceLand
Posts: 5,171
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You actually do have a measure of control over which images are selected by Facebook. But you have to have certain parameters in place. For example, you need to have the necessary meta tags in your head code, like described here: http://stackoverflow.com/questions/1...-select-images. And I went ahead and used replacement variables to insert the namespaces, so as to pass validation.

I'm also on vB3, and this I what I put in my headinclude, in addition to adding the proper namespaces.

HTML Code:
<!-- Facebook Meta Tags -->
<meta property="og:title" content="<if condition="$show['threadinfo']"><if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase> :: </if>$threadinfo[prefix_plain_html] $threadinfo[title]<else /><if condition="$show['foruminfo']"><if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase> :: </if>$foruminfo[title_clean]<else />$vboptions[hometitle]</if></if>" />
<meta property="og:site_name" content="$vboptions[bbtitle]" /> 
<meta property="og:url" content="$vboptions[homeurl]$_SERVER[SCRIPT_NAME]?$_SERVER[QUERY_STRING]" />
<meta property="og:description" content="<if condition="$show['threadinfo']">$threadinfo[preview]<else /><if condition="$show['foruminfo']">$foruminfo[description_clean]<else />$vboptions[description]</if></if>" />
<if condition="$show['threadinfo'] !=1"><if condition="$show['foruminfo'] !=1"><meta property="og:image" content="$vboptions[bburl]/images/fb-default.png" /></if></if>
<meta property="fb:app_id" content="YOUR-APP-ID-HERE" />
<!-- / Facebook Meta Tags -->
This is tailored to my site, and obviously you should get an app ID. (This helps with statistics.) Consult the Best Practices guide to get an understanding of what I've done here, and when you start adding tags, test them against the debugger. One of the things you might notice, if you look at my code and website in-depth, is I haven't yet created a suitable default image for pages that don't have a unique one. I put one in place, but Facebook isn't accepting it as such. In this case, Facebook is still choosing the best one based on it's internal config. And, oddly enough, we're still not sure why it doesn't honor this setup 100% of the time. But, even so, it's much more consistent that not having them at all.

--------------- Added [DATE]1421809672[/DATE] at [TIME]1421809672[/TIME] ---------------

Also note, you really only need to do this in one style. The default style guests see when they visit your website. This is the first style the Facebook crawler and the debugger will see, and will likely be the only one it checks.
Reply With Quote
Благодарность от:
Max Taxable
  #5  
Old 01-22-2015, 07:30 PM
compact compact is offline
 
Join Date: Jan 2003
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks so much Digital Jedi. It looks like i have some work ahead of me. I'll give it a shot.
Reply With Quote
Благодарность от:
Digital Jedi
  #6  
Old 02-12-2015, 10:30 AM
compact compact is offline
 
Join Date: Jan 2003
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Digital Jedi View Post
You actually do have a measure of control over which images are selected by Facebook. But you have to have certain parameters in place. For example, you need to have the necessary meta tags in your head code, like described here: http://stackoverflow.com/questions/1...-select-images. And I went ahead and used replacement variables to insert the namespaces, so as to pass validation.

I'm also on vB3, and this I what I put in my headinclude, in addition to adding the proper namespaces.

HTML Code:
<!-- Facebook Meta Tags -->
<meta property="og:title" content="<if condition="$show['threadinfo']"><if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase> :: </if>$threadinfo[prefix_plain_html] $threadinfo[title]<else /><if condition="$show['foruminfo']"><if condition="$pagenumber>1"><phrase 1="$pagenumber">$vbphrase[page_x]</phrase> :: </if>$foruminfo[title_clean]<else />$vboptions[hometitle]</if></if>" />
<meta property="og:site_name" content="$vboptions[bbtitle]" /> 
<meta property="og:url" content="$vboptions[homeurl]$_SERVER[SCRIPT_NAME]?$_SERVER[QUERY_STRING]" />
<meta property="og:description" content="<if condition="$show['threadinfo']">$threadinfo[preview]<else /><if condition="$show['foruminfo']">$foruminfo[description_clean]<else />$vboptions[description]</if></if>" />
<if condition="$show['threadinfo'] !=1"><if condition="$show['foruminfo'] !=1"><meta property="og:image" content="$vboptions[bburl]/images/fb-default.png" /></if></if>
<meta property="fb:app_id" content="YOUR-APP-ID-HERE" />
<!-- / Facebook Meta Tags -->
This is tailored to my site, and obviously you should get an app ID. (This helps with statistics.) Consult the Best Practices guide to get an understanding of what I've done here, and when you start adding tags, test them against the debugger. One of the things you might notice, if you look at my code and website in-depth, is I haven't yet created a suitable default image for pages that don't have a unique one. I put one in place, but Facebook isn't accepting it as such. In this case, Facebook is still choosing the best one based on it's internal config. And, oddly enough, we're still not sure why it doesn't honor this setup 100% of the time. But, even so, it's much more consistent that not having them at all.

--------------- Added [DATE]1421809672[/DATE] at [TIME]1421809672[/TIME] ---------------

Also note, you really only need to do this in one style. The default style guests see when they visit your website. This is the first style the Facebook crawler and the debugger will see, and will likely be the only one it checks.
So this worked like a charm! Thanks again for the help. I am now wondering if there is a way to set it up in a way where facebook would choose the first image that is in that particular thread? I wouldn't mind just uploading an image that is relevent to that particular thread and then sharing it. Is this possible?
Reply With Quote
Reply


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:16 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.10568 seconds
  • Memory Usage 2,257KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (2)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (1)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete