News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Open Graph topic Facebook

Started by Dhayzon, September 01, 2016, 10:45:48 PM

Previous topic - Next topic

Paracelsus

Quote from: Kindred on December 12, 2016, 10:14:20 PM
However, since smf does not do a single post on its own page, there is no way to avoid that

Isn't it possible to generate dynamic meta tags according to the link in each post?

I found among other links, this one: http://stackoverflow.com/questions/17476699/how-do-i-create-a-custom-facebook-share-dialog-box-passing-parameters

So it should be possible to pass the info we want to share, it just has to be dynamically and not static generated.

Kindred

just so that you are aware...   the OG tags ARE generated "dynamically" -- that is why each page has its own set of tags.

static would be the description, if the tags were the same across ALL pages
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Paracelsus

Quote from: Kindred on December 14, 2016, 08:46:40 AM
just so that you are aware...   the OG tags ARE generated "dynamically" -- that is why each page has its own set of tags.

static would be the description, if the tags were the same across ALL pages

Ok, perhaps I wasn't clear enough on my previous post, what I mean is that it should be possible to generate the correct info to pass on the facebook feed dialog, like grabbing the first sentences of that specific post for the description and the first image in the post for the picture parameter and so on.

Kindred

in short... not with this mod.


What you are asking for is a modification to the individual "share this specific post" mod.

THIS mod adds the OG tags into the header, dynamically, for each *PAGE*. It does not add a "share" button...

So, what you are doing (sharing an individual post) is not even within the design of this mod.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Paracelsus

Quote from: Kindred on December 14, 2016, 08:56:30 AM
in short... not with this mod.


What you are asking for is a modification to the individual "share this specific post" mod.

THIS mod adds the OG tags into the header, dynamically, for each *PAGE*. It does not add a "share" button...

So, what you are doing (sharing an individual post) is not even within the design of this mod.

Yes, I understand that, was just pointing out that this MOD scrambles/overrides the sharing individual posts functionality.

Kindred

then don't install this mod?

or rather... n  this mod does exactly what it is designed to do (and what the core of 2.1 does)
So, it is, rather, the author of the individual share mod that needs to fix their code.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Jade Elizabeth

Once proud Documentation Writer and Help Squad Leader | Check out my new adult coloring career: Color With Jade/Patreon.

Vince S

Just to ask a potentially silly question, is this mod being supported?

I have been trying to get links to topics in Facebook to display an image rather than a 403 error so installed the mod. On smf 2.0.14, whereas the mod only references 2.0.11 compatibility, despite that 2.0.14 instructions are available.

Discussion about the problem here, lack of responses means it must be hard I guess?
Try figuring out where all this is going to keep coming from: Millionaire Baby? Or just pass me a beer and we'll sort it, thank you.....

luuuciano

#28
Mmmmmm, as I wanted to improve facebook posts shared at facebook... installed this mod, but it does not work as intended...
I have been using a mod to provide inline images... so, tested using a regular img (using the link provided by this image mod): https://cbabikes.com.ar/dlattach/attach.6539/image./ciclismo-urbano/bicicletas-un-beneficio-para-todos-aunque-les-moleste-13461.0.html (oh yes, that is an image... lol)

Any idea how to modify the mod to use that kind of image links?

Or... how to improve posts shared at facebook? images are no properly fetched anymore...

There is any mod to add a OG:IMAGE image, as a field in posts?? did not find...

LOOKING at the code, I found this line:
if(preg_match('/(https?:\/\/\S+\.(?:jpg|png|gif))\s+/',$ogImage,$match))
...
hot to change it to match URLs that has "dlattach/attach" or just "dlattach" on it?

Any regular expression magician here?

UPDATE, asked on an IRC channel and this came up:
         if(preg_match('/((https?:\/\/\S+attach\S+))\s+/',$ogImage,$match))

It seem to do the job.... at least... will test it at fb
No me agradan los foros que no te dejan borrar TU PROPIO usuario, como por ejemplo smfsimple.com.
E incluso te mandan emails no solicitados, de los cuales, quizá, no puedas escapar porque NO te dejan posibilidad a deshabilitarlos (a menos que NO te tengan en su lista negra).

smartmouse

Does this mod work with SMF v2.1.1?

shadav

Quote from: smartmouse on April 27, 2022, 08:41:56 AMDoes this mod work with SMF v2.1.1?
did you check the mod's page?
QuoteCOMPATIBLE WITH 2.0.11
so then to answer your question...no it is not
and well seeing that
QuoteLast Updated
September 02, 2016,
I wouldn't hold my breathe on an update to v2.1.x

Advertisement: