Advertisement:

Author Topic: Open Graph topic Facebook  (Read 7893 times)

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 872
  • Gender: Male
Re: Open Graph topic Facebook
« Reply #20 on: December 14, 2016, 08:43:29 AM »
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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,416
  • Gender: Male
    • Kindred-999 on GitHub
Re: Open Graph topic Facebook
« Reply #21 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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 872
  • Gender: Male
Re: Open Graph topic Facebook
« Reply #22 on: December 14, 2016, 08:50:03 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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,416
  • Gender: Male
    • Kindred-999 on GitHub
Re: Open Graph topic Facebook
« Reply #23 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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Paracelsus

  • Sr. Member
  • ****
  • Posts: 872
  • Gender: Male
Re: Open Graph topic Facebook
« Reply #24 on: December 14, 2016, 09:00:49 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.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 59,416
  • Gender: Male
    • Kindred-999 on GitHub
Re: Open Graph topic Facebook
« Reply #25 on: December 14, 2016, 09:03:02 AM »
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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Jade Elizabeth

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,701
  • Gender: Female
  • Keep your enemies close and your friends closer ;)
    • jadetrainor on LinkedIn
    • @alundra on Twitter
    • Jades-World
Re: Open Graph topic Facebook
« Reply #26 on: December 17, 2016, 08:22:55 AM »
I'm at the university's final exams
wait for me :(

GOOD LUCK!!!!! :D :D :D

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

Offline Vince S

  • Jr. Member
  • **
  • Posts: 263
  • Gender: Male
  • Binary biker, 1 position
    • Hunter Ducati Owners Group Inc
Re: Open Graph topic Facebook
« Reply #27 on: August 09, 2017, 10:24:23 PM »
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.....

Offline luuuciano

  • SMF Hero
  • ******
  • Posts: 2,979
    • http://cbasites.net/
Re: Open Graph topic Facebook
« Reply #28 on: Yesterday at 04:06:43 PM »
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
« Last Edit: Yesterday at 04:46:45 PM by luuuciano »
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).