share button for blogs

Hmmm how to word this without look dumb or even more dumber than i already look.

 

Ok so i want to make a share button for Facebook that shares the blog and the individual members blog image on facebook. The twitter, google +, pintrest ect aready does this correctly, however the facebook crap sharing thing only picks up the OG:image of the main page. which would look like this 

But this is my homepage and NOT the individuals blog and content. which is kinda crap for someone wanting to share their blogs right?

So I thought i would make my own share/button with limited sucess,

when I am making a link to someones photos/events/ect I put the following in the head:-

 

$profileID = getID($_GET['ID']);

$aProfile = getProfileInfo($this->oProfileGen->_iProfileID);

$sNickName = $aProfile['NickName'];

$aUserData = getProfileInfo($profileID);

$memberID = getLoggedId();

$iMemberId = $memberID;

and then:-

href="pedit.php?ID={$memberID}"

depending on what kind of link i want to achieve,

if i wanted to make the link look like this.....

/blogs/entry/THE NAME OF THE PERSONS BLOG HERE

how would I go about doing this? what data would I need to pull and what {$memberID} type thing would I need to put into the link? my idea is to make share buttons that only pull from that page.

I hope this post makes sense lol

thanks 

voni xx

 

Quote · 14 Oct 2017

I used Deano's Head Injections to add og: image tags to the relative blog page.

It's labour intensive, but works.

http://meta-travel.com/m/groups/blog/view/Travel-in-Asia

Cool

~~~~~~~~~~~~~~~~~~~~~~
Michel - Meta-Travel.com
~~~~~~~~~~~~~~~~~~~~~~

TravelNotes.org - The Online Guide to Travel
Quote · 14 Oct 2017

Blog posts may or may not have an image; so you would need to create an og-image to be passed along to FaceSucks.

Geeks, making the world a better place
Quote · 14 Oct 2017

i have denos head injections, but idk how to use it lol, but not only that i would still need a url to put into the injections right? oh idk its beyond me

Quote · 14 Oct 2017

OK, 7.3.3 has FaceSucks og stuff built in.  Since blogs don't have an image to pass, unlike sharing an image, you have to change that.  Which is why the Dolphin one is passing the home page.  If you want a custom image to be passed; and it will have to be static or maybe you can use the member's profile page instead, you have to create that.

You need to do a bit of research on how it works. 

Geeks, making the world a better place
Quote · 14 Oct 2017

Not 100% sure but I think the og stuff is in the recommend block.  Do you have the recommend block on the page/

Geeks, making the world a better place
Quote · 14 Oct 2017

but blogs does have an image to pass. the upload an associated image

/media/images/blog/big_blog_8_0.jpg  the end of that url is the bit that changes each time. How does dolphin put that 8_0.jpg into the url? how can I draw that data?

I could make a separate button easily enough as a php block and make is as a html stick my meta OG into the head of that block and the share will work, it does kinda i just can't get the data to fill in the url


/blogs/entry/THE NAME OF THE PERSONS BLOG HERE

https://shoomboom.com/blogs/entry/Basics-of-Home-made-Soap-Making-The-things-you-will-need

there must be a way to find out how dolphin knows to turn that highlighted into that highlighted.

you know like this

https://shoomboom.com/blogs/entry/{member=id blog data here}


The recommend has fb like, its doesn't share the content. So i tried addthis but its shares the front page, plus i wanted the social sharing to be horizontal and the ones in recommend block are vertical 


and that head injections just doesn't install btw it says error 500 database can't handle this request

Quote · 14 Oct 2017

 

but blogs does have an image to pass. the upload an associated image

/media/images/blog/big_blog_8_0.jpg  the end of that url is the bit that changes each time. How does dolphin put that 8_0.jpg into the url? how can I draw that data?

I could make a separate button easily enough as a php block and make is as a html stick my meta OG into the head of that block and the share will work, it does kinda i just can't get the data to fill in the url


/blogs/entry/THE NAME OF THE PERSONS BLOG HERE

https://shoomboom.com/blogs/entry/Basics-of-Home-made-Soap-Making-The-things-you-will-need

there must be a way to find out how dolphin knows to turn that highlighted into that highlighted.

you know like this

https://shoomboom.com/blogs/entry/{member=id blog data here}


The recommend has fb like, its doesn't share the content. So i tried addthis but its shares the front page, plus i wanted the social sharing to be horizontal and the ones in recommend block are vertical 


and that head injections just doesn't install btw it says error 500 database can't handle this request

Yes, but not all blogs may have an attached image.  In that case, there won't be an og:image or you load a default og:image.

Geeks, making the world a better place
Quote · 14 Oct 2017

    /**
     * Set page meta Open Graph info.
     * @param array $a open graph info, such as type, image, title, site_name
     * @param string $sNamespace namespace, by default 'og'
     */
    function setOpenGraphInfo($a, $sNamespace = 'og')
    {
        $GLOBALS[$this->_sPrefix . 'OG'][$sNamespace] = array_merge(isset($GLOBALS[$this->_sPrefix . 'OG'][$sNamespace]) ? $GLOBALS[$this->_sPrefix . 'OG'][$sNamespace] : array(), $a);
    }
    /**

Geeks, making the world a better place
Quote · 15 Oct 2017

 

Blog posts may or may not have an image; so you would need to create an og-image to be passed along to FaceSucks.

That's why we add the og:image tags..... to add the image URL of an image we wish to use, even if there isn't one for Facebook to find on the page.

Laughing

~~~~~~~~~~~~~~~~~~~~~~
Michel - Meta-Travel.com
~~~~~~~~~~~~~~~~~~~~~~

TravelNotes.org - The Online Guide to Travel
Quote · 15 Oct 2017

 

i have denos head injections, but idk how to use it lol, but not only that i would still need a url to put into the injections right? oh idk its beyond me

As you don't have it installed - Module(Head_Injections) was not found - you will need to install it. That's is not all that easy anymore, but it is possible.

I posted in the Head Injections support forum ages ago.

I've upgraded my site to Dolphin 7.3.0 and upgraded the Premium Groups Module, which had Head Injections on it.

inc/classes/BxDolTemplate.php was changed in Dolphin-Patch-v.7.1.6-to-v.7.2.0-v.3

The line numbers given in your code have moved (Part 3 now comes before Part 2) but following the module's Install Instructions still works.

Cool

Deano also gave you a lot of instruction on the matter, way back when.

If you can get it installed properly, then go to the Head Injections admin page.

To Insert New Injection, first you need the 'Page title to match' - currently:

Basics of Home made Soap Making - The things you will need

Then, in Injections:

<meta property="og:image" content="https://shoomboom.com/media/images/blog/orig_blog_8_0.jpg">
<meta property="og:image:type" content="image/jpg">
<meta property="og:image:width" content="275">
<meta property="og:image:height" content="183">

 

Then cross your fingers and hope people start sharing the post to Facebook. If people don't share the post, then you can save yourself a lot of time.

Embarassed

~~~~~~~~~~~~~~~~~~~~~~
Michel - Meta-Travel.com
~~~~~~~~~~~~~~~~~~~~~~

TravelNotes.org - The Online Guide to Travel
Quote · 15 Oct 2017

the problem with this is, i would have to make a new injection per blog, and that tbh is ok if its just me, but what about when I got 1000 people doing blogs?

<meta property="og:image" content="https://shoomboom.com/media/images/blog/orig_blog_8_0.jpg">

this is person specific, so you get what i mean, I need a way to do this by drawing the data directly for everyone.


"That's why we add the og:image tags..... to add the image URL of an image we wish to use, even if there isn't one for Facebook to find on the page."


ok so its not detecting that image on blogs, and on the blog i showed you, there is plenty of images to chose from. 

Quote · 15 Oct 2017

ok so I managed to fix this problem now, what I did was, to make the homepage show the image i want to promote the homepage, I stuck an image into the PHP block I made that contained the social connection buttons and set the image to 0px height and width so it couldn't be seen on homepage but still picked up by facebook. I removed the facebook OG meta tags from the basic settings head injections. Facebook now pics up the image from the homepage and the written content. 

 

On the blogs page because there is not OG meta stuff in the basic settings head injections bit, the buttons pick up whats on that page and it now works correctly, well as correctly as can be expected for facesuks.

 

Thanks for all your help

sorry I brainstorm in this way but its the only way i ever get to fix things lol

Quote · 15 Oct 2017

Good work @voni.

Nice to see you getting creative. A tip I might use myself sometime.

Brainstorming is great and I wish more people with Dolphin sites would do it. We can all learn from each other.

Cool

~~~~~~~~~~~~~~~~~~~~~~
Michel - Meta-Travel.com
~~~~~~~~~~~~~~~~~~~~~~

TravelNotes.org - The Online Guide to Travel
Quote · 15 Oct 2017
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.