Announcement

Collapse
No announcement yet.

Facebook sharing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Bug / Issue] Facebook sharing

    What can I do to get a chosen image to appear when posting a link to the forum on Facebook? If I enable the FB platform, it will produce a button on the registration page asking people to log in with FB, I don't want to have this option because were are telling people from FB that they can join our forum if they want to discuss sensitive issues anonymously and we don't want them to think we are going to get all their FB data, etc.

    If I disable FB the debugger says:
    The following required properties are missing: og:title, fb:app_id
    Even when enable FB, I still the FB debugger says:
    The following required properties are missing: og:title.
    The URL has been specified in admincp:

    Click image for larger version

Name:	FBImage.png
Views:	159
Size:	15.2 KB
ID:	4414412

    Any ideas?

  • #2
    For some reason, "og:title" tag is not in vBulletin 5 by default... if anyone is wanting to fix this:

    Edit the header template and not too far above the "<title>" tag, you fill find the following code:

    HTML Code:
     {vb:set nodeid, 0}
    {vb:set conversationStarter, 0}
    <vb:if condition="!empty($page['nodeid']) AND !empty($page['channelid'])">
    {vb:set nodeid, {vb:var page.nodeid}}
    {vb:rawdata conversation, node, getNodeContent, {vb:var nodeid}}
    <vb:if condition="!isset($conversation['errors']) AND !empty($conversation[$nodeid]['starter'])">
    {vb:rawdata conversationStarter, node, getNode, {vb:var conversation.$nodeid.starter}}
    <vb:if condition="isset($conversationStarter['errors'])">
    {vb:set conversationStarter, 0}
    </vb:if>
    </vb:if>
    </vb:if>
    Move the above code either to the very top of the header template or exactly 1 line directly above "<vb:if condition="$vboptions['show_opengraph_tags']">" at the very least.

    After that, you will be able to add the following in the place you want it:

    HTML Code:
    <meta property="og:title" content=" <vb:if condition="$page['channelid'] != $nodeid AND !empty($conversationStarter) AND isset($conversationStarter['htmltitle']) AND !empty($conversationStarter['htmltitle'])">
    {vb:raw conversationStarter.htmltitle} -
    <vb:elseif condition="isset($page['title'])" />
    <vb:if condition="!empty($page['titleprefix'])"> {vb:raw page.titleprefix} - </vb:if>
    {vb:var page.title} - <vb:comment>We have a page, not a channel. We don't allow html in page titles at the moment.</vb:comment>
    </vb:if>
    {vb:var vboptions.bbtitle}" />
    The above is simply the meta property and pasting everything between the "<title>" html into the content of the "og:title" tag.

    You can also add a valid Twitter card with "twitter:title" doing the same.
    It is fatal to enter any war without the will to win it.
    --General Douglas MacArthur

    Comment

    Related Topics

    Collapse

    Working...
    X