Posting to Facebook

Found a bug? Tell us!!
Ianardo
Regular
Posts: 114
Joined: Sun Nov 28, 2004 3:02 pm
Location: Hastings, U.K.
Contact:

Posting to Facebook

Post by Ianardo »

I'd love to be able to post individual stories to my blog to Facebook, however, whatever I do (other than faff around with bitly and tinyURL) works properly.
Links only paste to the front page of the blog - not the individual stories.
The Spreadly plugin does the same.

I just want to promote individual stories, along with a graphic.

Any suggestions?
75% of people make up three quarters of the World's population!
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Posting to Facebook

Post by yellowled »

Ianardo wrote:Any suggestions?
IFTTT works pretty good for me. Posts any blog post automagically to FB.

YL
bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: Posting to Facebook

Post by bernd_d »

Ianardo wrote:I just want to promote individual stories, along with a graphic.
Automatic postings (like with IFTTT) are a little bit tricky. If Facebook doesn't find og:image within your header, it uses another picture of your entry, for example an ugly smiley.

Within S9y it currently is not possible to set an automated og:image.

One solution could be to use header-plugin to set a static og:image for your whole weblog (maybe your favicon in better resolution).

Another solution could be to use individuel entry-fields and individually paste an link into this fields. But then there is the problem, that there is no plugin/code, which generates og:image meta-tags for this link.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Posting to Facebook

Post by garvinhicking »

Hi!

We have the serendipity_event_facebook plugin that enriches the pages with tags. It also adds i.e. an og:image attribute for the first image within an entry. So if your first picture is not a smilie, that graphic is used ;-)

Also note that Facebook really doesn't like links with "?" in the URLs, so if possible your blog should use URL Rewriting!

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: Posting to Facebook

Post by bernd_d »

garvinhicking wrote:We have the serendipity_event_facebook plugin that enriches the pages with tags. It also adds i.e. an og:image attribute for the first image within an entry. So if your first picture is not a smilie, that graphic is used ;-)
If you don't use any images within a posting, smiley is also used. In my case, this happens often.

Currently i try to write an event-plugin, that generates dynamic og-images depending on some content-informations (title, tags, date). Here is an exemple with static content and without plugin-functionality, for the moment it just generates an image. :|
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Posting to Facebook

Post by Timbalu »

Very nice! :)
You should make this plugin (name and usage) more general, since this is a nice Idea for other non-facebook usage scenarios too!
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: Posting to Facebook

Post by bernd_d »

Timbalu wrote:Very nice! :)
You should make this plugin (name and usage) more general, since this is a nice Idea for other non-facebook usage scenarios too!
Ideas are welcome. :)
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Posting to Facebook

Post by Timbalu »

Hm, it may be worth opening another thread for this, when you are ready to go.
Without having thought about it in deep, I could imagine showing these fancy entry images on a blogs startpage, as some sort of "gallery" HTML5 media "flash" Design replacement for entry summaries, which could help to invent some interesting new S9y Templates, in or w/o connection to staticpages. Or use this image for posting to other services too, etc.... Isn't that thinkable?
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: Posting to Facebook

Post by bernd_d »

Timbalu wrote:Isn't that thinkable?
Everything is thinkable. There is only a person needed, who can do it. ;)
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Posting to Facebook

Post by garvinhicking »

Hi!

Hm, the current event_facebook plugin already inspects $GLOBALS['entry'][0]['body'], so it should find the og:image tag. It might be interesting to debug that plugin if it does not work for you...maybe $GLOBALS['entry'] is not properly defined in your case.

Do you have an example blog entry where you use an image, and no smilies? I'd like to see/check what is used as og:image on that page.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: Posting to Facebook

Post by bernd_d »

garvinhicking wrote:event_facebook
Sorry, but (i think) we don't talk about this plugin. I don't use it.

The problem with missing og:image occures, if i use automated postings to Facebook (like IFTTT or something else). In this case, FB tries to use a lare image of the page (randomized i think, it seems not to be always the first one). But if there are none, it takes one of the smaller images (smilies) as you can see within Object Debugger.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Posting to Facebook

Post by garvinhicking »

Hi!
bernd_d wrote:
garvinhicking wrote:event_facebook
Sorry, but (i think) we don't talk about this plugin. I don't use it.
Ah, ok. Why not? It would fix your issue. :-)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
bernd_d
Regular
Posts: 468
Joined: Thu Jun 03, 2010 9:28 am
Contact:

Re: Posting to Facebook

Post by bernd_d »

garvinhicking wrote:
bernd_d wrote:
garvinhicking wrote:event_facebook
Sorry, but (i think) we don't talk about this plugin. I don't use it.
Ah, ok. Why not? It would fix your issue. :-)
No, it doesn't. (As far as i can test it)
Facebook still uses an random smilie-image, because there is no larger/first one within entry.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Posting to Facebook

Post by garvinhicking »

No, it doesn't. (As far as i can test it)
Facebook still uses an random smilie-image, because there is no larger/first one within entry.
If you're up for some testing, let me know. You'd need to install the plugin, post an entry with a bigger picture and then we'd investigate to what the og:image gets set and optimize that, if it doesn't work as of now.
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Posting to Facebook

Post by Timbalu »

Look what I found this morning:

Code: Select all

<!DOCTYPE html>
<html
lang='de'
xmlns="http://www.w3.org/1999/xhtml"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
....
Following these links you'll find yourself here:
http://ogp.me/ and http://graph.facebook.com/schema/og/#_=_

I asked myself (without further personal need and interest) if that might help here?!
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
Post Reply