vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Integration with vBulletin - Nexia's OpenGraph Protocol Inserts (https://vborg.vbsupport.ru/showthread.php?t=281290)

tuRiver 04-24-2013 08:57 PM

Is it possible to overwrite vbulletin's default opengraph?

GHRake 05-16-2016 01:19 AM

This still works well, I've just incorporated it on my forum. It does not pull images from the thread, but it will use a default image. Facebook says the image should be 1200x630 but it was getting cut off so 1170x630 seems to work better for me...

I'm using this in conjuction with this mod:
Easiest way to add Social Bookmarks on Thread

You can read the Open Graphics Protocol documentation


You can also go to https://www.facebook.com/insights and get insights for your domain and connect those insights to your facebook page along with connecting to a facebook app. You can incorporate this into this plugin, editting the .xml file before importing and find:

Code:

        $og_array = array(
                'og:site_name'        =>        $vbulletin->options['bbtitle'],
                'og:description'=>        $vbulletin->options['description'],
                'og:title'                =>        $vbulletin->options['bbtitle'],
                'og:url'                =>        $vbulletin->options['bburl'],
                'og:image'                =>        $vbulletin->options['nex_opengraph_image'],
                'og:type'                =>        'website'
        );

Include 2 more elements to this array:
Code:

        $og_array = array(
                'og:site_name'        =>        $vbulletin->options['bbtitle'],
                'og:description'=>        $vbulletin->options['description'],
                'og:title'                =>        $vbulletin->options['bbtitle'],
                'og:url'                =>        $vbulletin->options['bburl'],
                'og:image'                =>        $vbulletin->options['nex_opengraph_image'],
                'og:type'                =>        'website',
             
                'fb:app_id'                =>  'YOUR_APP_ID',
                'fb:admins'        =>  'YOUR_ADMIN_ID'
        );

Replace YOUR_APP_ID and YOUR_ADMIN_ID with whatever you get from FaceBook.

Then test your markup here:
https://developers.facebook.com/tools/debug/sharing/

Maybe someone knows how to parse the thread text and pull the first hotlinked image or embedded youtube video?

This is what my final product looks like:
https://vborg.vbsupport.ru/external/2016/05/18.png

And here's a nice bonus: Google+ picks up the OG meta tags as well w00t

masterross 12-26-2018 11:33 AM

Perfect mod!
I combined with https://vborg.vbsupport.ru/showthread.php?t=300221
to get the thread's image.


All times are GMT. The time now is 02:41 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01559 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete